Reputation: 20304
I updated NodeJS to v16, and it ships with NPM v8, so when I install packages, package-lock.json
file is created with "lockfileVersion": 2
. I would like to stay with old format of "lockfileVersion": 1
. Can we install packages in NPM v8, but keep the version of package-lock.json
to 1?
Upvotes: 2
Views: 3946
Reputation: 161
I believe you can find thorough answers to this question at Is there any way to fix package-lock.json lockfileVersion so npm uses a specific format? . Using lockfileVersion 2 should be backwards compatible all the way back to at least NodeJS 6+ so im not sure why you would want to use version 1, but if you must there are solutions provided on the linked post.
Upvotes: 2