Use nvm to manage node
使用NVM来管理node的版本,并使用国内镜像安装

安装NVM
从GITHUB获取最新链接
Use curl install
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash- or use wget
bash wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
- or use wget
设置环境变量使用国内node镜像
Set nvm mirrors
$ vim ~/.bashrc # set nodejs env export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node- Take it effect
bash $ source ~/.bashrc
- Take it effect
Set npm mirrors
$ npm config set registry https://registry.npm.taobao.org