将本地Node升级到9.2.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版本未5.6.1
貌似这是新版本的一个BUG,在这个ISSUE里面可以看到相关的讨论:https://github.com/npm/npm/issues/19019
基本的思路是想办法升级NPM到5.6.0版本(npm install -g npm@latest
)
但是由于我的NPM命令根本无法用,所以还是通过brew
方式来进行升级。
brew install --devel node