Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to generate just a package-lock.json file without doing an npm install?

I need to generate just a package-lock.json file, but I don't want to rerun npm install.

Is it possible just to generate this lock file without it reinstalling any of my package files?

like image 216
Showcaselfloyd Avatar asked Oct 24 '17 16:10

Showcaselfloyd


1 Answers

You can use the --package-lock-only argument:

npm install --package-lock-only

See the documentation:

The --package-lock-only argument will only update the package-lock.json, instead of checking node_modules and downloading dependencies.

like image 169
s.alem Avatar answered Sep 29 '22 16:09

s.alem