Web build

npm ci: lockfile is out of sync with package.json

The lockfile doesn’t match package.json

npm ci: lockfile is out of sync with package.json. package.json changed — often edited by an AI builder — without its lockfile, and CI installs refuse to guess.

Updated

What this error means

package.json changed — often edited by an AI builder — without its lockfile, and CI installs refuse to guess.

Why it happens

package.json lists dependencies the lockfile does not. CI uses a frozen lockfile, so it stops instead of rewriting it.

The message tools print

npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

How to fix it

  1. Run the install command locally (npm install, bun install…).
  2. Commit the updated lockfile together with package.json.

Check a log that shows this

Paste the failing step into the build error explainer. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

Other Web build errors

Build the web app before the native one

CapWrapp installs dependencies from the lockfile, builds the site, and runs Capacitor sync before the native build, from the GitHub repo you connect.

  • Free to start
  • No credit card
  • Sign in with Google or GitHub