npm警告处理:npm does not support Node.js v9.0.0
Node.js 升级为v9.0.0,npm启动项目得到以下警告:
npm WARN npm npm does not support Node.js v9.0.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
npm:v5.5.1
这个原因是npm 5.5.1支持的node版本为4,6,7,8最新的版本,警告出自于npm的unsupported.js。
有三种处理办法:
1、如果没有出错,暂时可以忽略此警告,估计npm后续会更新支持node 9
2、如果有问题,可以卸载自己安装的npm(即npm 5.5.1),使用安装node 9时自带的npm。
npm uninstall -g npm
3、降级为npm@5.3.x:
npm install -g npm@5.3.x