When generating a package-lock.json file with npm install, I get this error:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '16.0.0' },
npm WARN EBADENGINE current: { node: 'v16.10.0', npm: '7.24.0' }
npm WARN EBADENGINE }
A little confused here. It requires node v16.0.0, and that's the one I'm using. And isn't npm v7.x.x compatible with that version of node?
CodePudding user response:
You are using 16.10.0, but the message says it requires 16.0.0. Not 16.0.0 or greater. It requires exactly 16.0.0.
If it's your package.json with the engines field causing this issue, change it to say 16.0.0 or greater:
"engines": {
"node": ">=16.0.0"
},