Chore: add npm5 generated `package-lock.json` to git repo?
See original GitHub issue-
NPM 5 will automatically create a
package-lock.json
when installing packages unless there’s already npm-shrinkwrap.json in which case it will update it instead (if necessary). -
The new
package-lock.json
is never published and should be added to your version control system.
or if we do not add it to git repo, better add to .gitignore
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Do I commit the package-lock.json file created by npm 5?
Short answer: yes. One comment: when package-lock.json changes you can make a commit of just that change, separate from other source changes.
Read more >package-lock.json - in GIT or not? - DEV Community
This creates a problem by itself because then every npm install will create thousands and more changes, and will make it impossible to...
Read more >package-lock.json - npm Docs
Description. package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json .
Read more >Cordova-lib Release Notes - Gitea
... dependency on cordova-create; GH-841 chore: add package-lock.json ... CB-12762 point package.json repo items to github mirrors instead ...
Read more >package-lock.json does not exist - You.com | The search ...
Removes node_modules and install all dependencies at once. It never writes to package.json or package-lock.json . Algorithm. While npm ci generates ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If we put
package-lock = false
in.npmrc
, I think npm won’t generate apackage-lock.json
file at all.I think we should not ignore
package-lock.json
. Ifpackage-lock.json
exists, npm seems to ignorepackage.json
. As a result, I guess localpackage-lock.json
will cause confusing ifgit pull
changespackage.json
.I think our options are:
package-lock.json
into our repo..npmrc
which disablespackage-lock.json
into our repo.