Figure out npm v7 and lockfileVersion 2
See original GitHub issueRunning npm install
with npm 7 on the repo currently doubles the length of the lockfile as part of converting it to version 2. I’m not sure what’s going on here. When I just had to add a new dependency, I ended up manually editing some of the changes to the lockfile back out. At least npm ci
with npm v7 seems to leave things unchanged.
(Maybe this is a good opportunity to switch to using pnpm?)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Is 'lockfileVersion: 2' in package-lock.json from npm 7 ...
Under the "lockfileVersion" section it states: "[lockfileVersion 2]: The lockfile version used by npm v7, which is backwards compatible to v1 ...
Read more >package-lock.json - npm Docs
Lockfiles generated by npm v7 will contain lockfileVersion: 2 . No version provided: an "ancient" shrinkwrap file from a version of npm prior...
Read more >npm - Catching Up with Package Lockfile Changes in v7
First of all, the lockfileVersion field is an integer pointing which schematics version were used to generate the file. So, in case of...
Read more >npm package json lock version 1 or 2 - Daniel Abrahamberg -
How to keep package-json-lock.json on version 1 if we upgraded to node 16 and npm 8. What is this file and why it...
Read more >npm - Catching Up with Package Lockfile Changes in v7
This video introduces the changes that were done in the seventh version of npm for better performance while allowing deterministic and ...
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 Free
Top 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
Don’t have to tell me twice: https://github.com/sveltejs/svelte/pull/6614
Through the passage of time, I’ve stopped really caring about this. I’m fine if we want to upgrade to lockfile v2.