Closed DenisSergeevitch closed 1 hour ago
Weird this does work on my m2 mac. I think devEngines
is in fact a supported field? https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines
same happens on Windows. Had to manually change devEngines to engines
I had to do this as well, M1 Mac with Sequoia.
By default it returns an error:
(base) ➜ agent.exe git:(main) npm install npm error Invalid property "node"
To resolve it we need to update package.json:
"Invalid property 'node'" is caused by the presence of the "devEngines" field in package.json. This field is not supported in modern versions of npm, which is why I get error with npm 10.9.0.
Here is a quick fix for people who has the same error:
Open
package.json
and edit line239
:Before:
"devEngines": { "node": ">=14.x", "npm": ">=7.x" }
After:
"engines": { "node": ">=14.x", "npm": ">=7.x" }
Now
npm install
will work
use nvm to control node version
Ok seems like this is a common issue, I just pushed an update that should fix!
By default it returns an error:
To resolve it we need to update package.json:
"Invalid property 'node'" is caused by the presence of the "devEngines" field in package.json. This field is not supported in modern versions of npm, which is why I get error with npm 10.9.0.
Here is a quick fix for people who has the same error:
Open
package.json
and edit line239
:Before:
After:
Now
npm install
will work