安装node管理包
安装n模块
npm install -g n
升级到最新版本
sudo n latest
升级到稳定版本
sudo n stable
升级npm
sudo npm install npm@latest -g
查看版本
node -v
npm -v