遇到如下警告
PS C:UsersAdministrator> 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的版本支持关系