ubuntunpmpackage.jsonpackage-lock.json

npm refuses to generate package-lock.json


If I update a dependency manually in the package.json or "automatically" (by installing a package through npm CLI) both methods do not update the package-lock.json leaving me with a broken npm ci build (inconsistencies between package.json and package-lock.json not allowed).

Things I have tried without a package-lock.json being updated (or created for that matter):

My colleague, on macOS, does see updates of the package-lock.json file with npm install after manually changing a dependency in the package.json and I cannot figure out why.

I have read and tried solutions in the following topics without resolving:


Solution

  • TLDR: well this is embarrassing; don't have a package-lock=false in your .npmrc. The end.