2

I used nvm to install the latest node.js version, but when I tried to update to the latest npm version, it said this:

npm WARN notsup Unsupported engine for npm@8.6.0: wanted: {"node":"^12.13.0 || ^14.15.0 || >=16"} (current: {"node":"10.19.0","npm":"6.14.4"})

npm WARN notsup Not compatible with your version of node/npm: npm@8.6.0

realguystuff
  • 43
  • 1
  • 8

4 Answers4

2

You need to upgrade your version of node.

I ran into this same issue.

If you used Homebrew run:

brew update  # This updates Homebrew to latest version
brew upgrade node

If you use nvm run:

nvm current node -v  # Checks your current version
nvm install <version>  # Example: nvm install 14.15.0

For the above step go to https://nodejs.org/en/download/

Grab a version that satisfies the conditionals in your error, the latest version should work.

More Detailed Walkthrough: https://flaviocopes.com/how-to-update-node/

Milan Sachani
  • 335
  • 3
  • 8
  • i already installed the **latest** nodejs using nvm – realguystuff Apr 07 '22 at 04:05
  • `nvm current node -v` gives me `v17.8.0` which is the latest – realguystuff Apr 07 '22 at 04:09
  • ok, I see then you can try to update NPM in your terminal with these commands. https://stackoverflow.com/questions/16525430/npm-check-and-update-package-if-needed – Milan Sachani Apr 07 '22 at 06:44
  • `ERROR: npm is known not to run on Node.js v10.19.0` `You'll need to upgrade to a newer Node.js version in order to use this` `version of npm. You can find the latest version at https://nodejs.org/` it still thinks its on `Node.js v10.19.0` – realguystuff Apr 07 '22 at 11:04
  • yes, because you have to upgrade your node version to install the latest version of NPM. and the ERROR itself says that you will need to upgrade to a newer Node.js version :) – Milan Sachani Apr 07 '22 at 11:11
1

Try to remove package-lock.json before updating to the latest npm version .

0

This may work:

nvm install NEW_VERSION --reinstall-packages-from=OLD_VERSION

0

This will install current version of node.

nvm install node