先,命令行可以直接切换(不方便):
npm config set registry https://registry.npm.taobao.org
以下用nrm切换:
安装:
npm install -g nrm
查看可切换镜像源:
nrm ls
* npm ----- https://registry.npmjs.org/
cnpm ---- http://r.cnpmjs.org/
taobao -- https://registry.npm.taobao.org/
nj ------ https://registry.nodejitsu.com/
rednpm -- http://registry.mirror.cqupt.edu.cn
skimdb -- https://skimdb.npmjs.com/registry
切换到cnpm镜像源
nrm use cnpm