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.

Figure out npm v7 and lockfileVersion 2

See original GitHub issue

Running 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:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
benmccanncommented, Aug 3, 2021

Don’t have to tell me twice: https://github.com/sveltejs/svelte/pull/6614

0reactions
Conduitrycommented, Aug 3, 2021

Through the passage of time, I’ve stopped really caring about this. I’m fine if we want to upgrade to lockfile v2.

Read more comments on GitHub >

github_iconTop 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 >

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