一、nvm
1、下载和安装
* 卸载nodejs,下载并解压安装nvm:
https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.zip
2、配置settings.txt(nvm安装目录。后面添加。不配置则不会有npm命令)
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
3、常用命令
* nvm install <version>
* nvm uninstall <version>
* nvm ls
* nvm current
* nvm use <version>:cmd需以管理员身份运行
二、nrm
1、安装
npm i -g nrm
2、常用命令
* nrm ls
* npm config get registry
* nrm add <registry> <url>
* nrm use <registry>
* nrm del <registry>