I updated to the latest node v9.1.0 and now npm doesn't work.
npm WARN npm npm does not support Node.js v9.1.0
To Solve npm does not support Node. js v10. 19.0 You should probably upgrade to a newer version of node as we can't make any promises that npm will work with this version Error If You are using Linux Then Follow this: npm cache clean -f then Run npm install -g n then sudo n latest Now, Your error must be solved.
Make sure to use sudo npm install -g npm if on a Mac. You can also update all outdated local packages by doing npm update without any arguments, or global packages by doing npm update -g . To update Node. js itself, I recommend you use nvm, the Node Version Manager.
Use npm list [package-name] to know the specific latest version of an installed package. Use npm install [package-name]@[version-number] to install an older version of a package. Prefix a version number with a caret (^) or a tilde (~) to specify to install the latest minor or patch version, respectively.
It turns out that the current installed npm
is not compatible with the new node
and has a hard time updating.
The solution is to uninstall npm
and then reinstall node
which will contain the correct version of npm
.
Here's how:
Uninstall npm
.
Mac: sudo npm uninstall -g npm Windows: npm uninstall -g npm
Install node
from https://nodejs.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With