npm install not creating a new package-lock.json

Dblock247 picture Dblock247 · Aug 24, 2017 · Viewed 37.2k times · Source

I accidentally deleted my package-lock.json file. npm install is not generating a new one. How do I get npm to recreate this file.

Answer

David Mulder picture David Mulder · Nov 6, 2018

There might be a file called .npmrc which can contain

package-lock=false

which will cause no package lock file to be generated.