Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
837 views
in Technique[技术] by (71.8m points)

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...