question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[npm] What should we do about lockfiles?

See original GitHub issue

Right now it doesn’t seem that there’s any package-lock.json files in any of the packages. But the lerna exec npm install will create a lockfile in each package.

Npm claims that we should commit these. Is there any reason we haven’t?

Could we either add them or add them to the .gitignore?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hshoffcommented, Aug 16, 2017

@ljharb makes sense thank you!

0reactions
ljharbcommented, Aug 16, 2017

@hshoff Only apps should have lockfiles. Libs/packages should add package-lock=false to .npmrc, and gitignore package-lock.json, npm-shrinkwrap.json, and yarn.lock, full stop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

package-locks - npm Docs
These files are called package locks, or lockfiles. Whenever you run npm install , npm generates or updates your package lock, which will...
Read more >
What is package lock json? Lockfiles for yarn & npm ... - Snyk
In this article we will discuss both npm's package lock file package-lock.json as well as Yarn's yarn.lock. Package lock files serve as a ......
Read more >
When Not to Use Lock Files with Node.js - Twilio
A lock file describes the entire dependency tree as it is resolved when created including nested dependencies with specific versions. In npm ......
Read more >
npm WARN old lockfile The package-lock.json file was ...
For example, npx npm@6 ci would run npm ci with npm version 6 even if you have version 7 installed. Share.
Read more >
What is a lockfile and why you should commit it [9 of 26]
Lockfiles in Node.js are very important yet often misunderstood. Learn what is package-lock.json, how it work and why it's needed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found