1.nvm: node版本管理工具
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
2.安装node
nvm install v10.16.3
3.npm更新
npm -g install [email protected]
4.修改npm下载镜像
npm config set registry "http://registry.npm.taobao.org/"
或使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org