Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm WARN npm npm does not support Node.js v9.1.0

Tags:

node.js

npm

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

like image 732
Matt Avatar asked Nov 10 '17 15:11

Matt


People also ask

Can't make any promises that npm will work with this version?

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.

How do I update npm to latest version?

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.

How do I install a specific version of npm?

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.


1 Answers

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:

  1. Uninstall npm.

    Mac: sudo npm uninstall -g npm  Windows: npm uninstall -g npm 
  2. Install node from https://nodejs.org

like image 100
Matt Avatar answered Sep 21 '22 08:09

Matt