遇到 npm WARN npm npm does not support Node.js vx.x.x的解决办法

遇到如下警告

PS C:\Users\Administrator> npm
npm WARN npm npm does not support Node.js v9.11.2
npm WARN npm You should probably upgrade to a newer version of node as
npm WARN npm can't make any promises that npm will work with this vers
npm WARN npm Supported releases of Node.js are the latest release of 4
npm WARN npm You can find the latest version at https://nodejs.org/

说白了原因就是 node 版本太新,npm版本太旧,不支持新版node,更新npm版本即可。

npm install -g npm # 或者 cnpm install -g npm
npm install -g cnpm # 或者 cnpm install -g cnpm

可以通过这个链接查看node和npm的版本支持关系

https://nodejs.org/zh-cn/download/releases/

posted @ 2019-06-27 14:53  DHclly  阅读(8173)  评论(0编辑  收藏  举报