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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With