Error AtlasError Documentation and Resolution

npm ci package.json and lockfile are not in sync

npm ci can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.

npm ci performs a frozen installation. It refuses to repair a missing or inconsistent lockfile, so a manifest change that was not accompanied by the correct lockfile update breaks clean installs.

npm ci lockfile out of syncdependencies
npm ci can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.
  • package.json changed without a corresponding lockfile update.
  • CI uses different dependency-tree options from the environment that generated the lockfile.
  1. Confirm the command runs from the correct project or workspace root and that the intended lockfile is committed.
  2. Using the project-supported Node and npm versions, run npm install locally to reconcile the manifest and lockfile. Inspect the diff rather than deleting the lockfile blindly.
  3. Commit the reviewed manifest and lockfile together, then verify npm ci succeeds from the same project root.
  4. If the lockfile was deliberately generated with tree-shaping options such as legacy-peer-deps or install-links, supply the same options to npm ci, preferably through reviewed project configuration.
npm official documentation