Fix · Node, npm and build
npm ci fails: package.json and package-lock.json are not in sync
What you may see
- The build on the host fails at install with a lock file message
- I edited package.json by hand
Most likely cause
package.json lists packages that package-lock.json does not know (or the reverse), because one of them was changed without the other.
Check first (about two minutes)
- Run git status: is package-lock.json changed but not committed?
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Run npm install locally to update the lock file, then show me git diff --stat for the two files.
- Check that only expected packages changed, commit BOTH files together, and push.
- Confirm the host uses the same package manager as the lock file.
Do not do this
- Do not commit only one of the two files.
- Do not delete the lock file to "fix" it.