David Ewins
Error library

EAS build fails at Install dependencies: Missing package from lock file

npmConfirmed fix

EAS builders npm 10.9.8 / Node 22; local npm 11 / Node 25; Expo SDK 57 (expo ~57.0.20, React Native 0.86.3, React 19.2.3)

Error
npm error `npm ci` can only install packages when your package.json and package-lock.json are in sync. Missing: @shopify/flash-list@2.3.2 from lock file

Cause

EAS build images run npm 10, but the lockfile was written by npm 11. npm 11 leaves out some nested entries for optional or conflicting peers (here a nested peer of a chat SDK needing flash-list >=2.1.0) that npm 10's npm ci insists on. Local npm ci passes, EAS fails, and the EAS summary only says "Unknown error".

Fix

1. Reproduce locally with the builder's npm:

shell
npx -y npm@10.9.8 ci --include=dev --dry-run

2. Add the missing entries without changing versions:

shell
npx -y npm@10.9.8 install --package-lock-only

3. Re-run the dry run, commit the lockfile, then queue the build. Repeat after every npx expo install, because it runs your local npm 11 again.

More npm errors

Search all errors