Skip to content

Lockfile version not supported by build npm version #16

@per1234

Description

@per1234

package-lock.json was recently updated to lockfile format version 2:

0287453#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519R4

However, Node.js 14.x is used to build the project:

Node.js 14.x uses npm version 6.x, which uses lockfile format version 1:

https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json#lockfileversion:~:text=The%20lockfile%20version%20used%20by%20npm%20v5%20and%20v6

Contributors should always use a standardized Node.js version in order to ensure the behavior of the productions builds will match that of their own testing. With the updated lockfile format, the contributors using Node.js 14 will experience a confusing large diff in package-lock.json after running npm install due to that command automatically converting the file back to version 1 when ran with npm version 6.x.


I recommend defining the standardized version of Node.js via the engines.node key of package.json to ensure all contributors use the correct version:

https://docs.npmjs.com/cli/v8/configuring-npm/package-json#engines

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions