Add package-lock.json to .gitignore
See original GitHub issueWhen cloning the app, it seems like package-lock.json
is present while it probably shouldn’t, because it is changed when the package is built. It is a per-developer, developer-specific auto-generated file and should be discarded from the git repository.
As a side node, I think it would be appropriate to use gitignore.io to generate a proper template for the .gitignore
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Should the package-lock.json file be added to .gitignore?
No, the package-lock.json SHOULD NOT be added to .gitignore . Instead, I strongly advise: Add the package-lock.json you to your version ...
Read more >Add package-lock.json to .gitignore #26 - GitHub
Describe the bug. Add package-lock.json to .gitignore with a comment saying it's ignored because the project uses yarn. ; To Reproduce. Run npm ......
Read more >package-lock.json - in GIT or not? - DEV Community
One solution for this problem is to commit the node_modules folder to GIT, which includes all of the code your application uses. This...
Read more >Should the package-lock.json file be added to .gitignore?
Depends on the situation, but usually no. You'd only want to add it if there is value in the fixation of the versions....
Read more >Should I include package-lock.json in source control?
To recap, you should always include both package.json and package-lock.json in your source control. Thus, never put them in the .gitignore file.
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
Oh! Then, I feel like it would be justified to change the readme from
npm install
tonpm ci
. It would prevent having an unclean repo when building the app@NatoBoram if we use
npm ci
it will install the exact same dependencies without updating them: https://docs.npmjs.com/cli/ci. It’s useful to use in test environments to make sure everything is the same.