node.js - Why does not “npm install” rewrite package-lock.json? And also not generate new one if not exist? -


i'm expecting see changes in package-lock.json file after adding new dependency in package.json , running npm install - package-lock.json not changing. settings: node version 6.11.0 npm version 3.10.10 have tried delete old package-lock.json, after run npm install - no new file generated. can please tell me how renew package-lock.json? edit: me , coworker have different npm versions, have package-lock.json in codebase, not able renew because current npm version not supporting feature. after update working fine.

why not “npm install” rewrite package-lock.json?

because point of package-lock.json tell npm modules install, if present. if not present, npm writes "cache" dependency tree subsequent installs.

just rm package-lock.json , install again update package-lock.json

and not generate new 1 if not exist?

if not getting package-lock.json generated, have old version of npm doesn't support it, or have configured npm not generate (which possible).


Comments

Popular posts from this blog

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -