windows环境:

npm升级(需要管理员身份运行powshell):

参考地址:https://github.com/felixrieseberg/npm-windows-upgrade

npm install -g npm-windows-upgrade
npm-windows-upgrade

 nodejs升级:

打开http://nodejs.org 网址,下载最新的.msi安装包,然后点击安装包进行安装。

参考地址:http://exponential.io/blog/install-or-upgrade-nodejs-on-windows/

 

centos环境:

参考地址:https://www.hostingadvice.com/how-to/update-node-js-latest-version/#linux

npm cache clean -f
npm install -g n