npm ci error when attempting to build after github push
ismailn16
HOBBYOP

3 months ago

I had recently upgraded the version of Next.js from 15.4.6 to 15.4.8 and react from 19.1.0 to 19.1.2. I also had upgraded my node version to 25.2.1 from what I believe was 23.5.0. I have now pushed my changed package.json to github and now my builds are failing.

I keep on getting this error in the title: npm error The npm ci command can only install with an existing package-lock.json or

npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or

npm error later to generate a package-lock.json file, then try again.

My project has always used nixpacks as the builder so I havent changed that. Also for context, I havent worked on this in a while.

If anyone has any solutions on how to get past this I would really appreciate it.

Solved$10 Bounty

Pinned Solution

Try deleting node_modules and package-lock.json locally and re-run npm i to regenerate modules and the lockfile. Make sure to commit the new lockfile as well.

3 Replies

Railway
BOT

3 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Try deleting node_modules and package-lock.json locally and re-run npm i to regenerate modules and the lockfile. Make sure to commit the new lockfile as well.


0x5b62656e5d

Try deleting node_modules and package-lock.json locally and re-run npm i to regenerate modules and the lockfile. Make sure to commit the new lockfile as well.

ismailn16
HOBBYOP

3 months ago

Thanks! I had to set the root directory to my app's main directory then I deleted node_modules and package-lock.json and ran npm i and it worked.


Status changed to Solved brody 3 months ago


Loading...