nrm (opens new window)[ 建议 ]
安装:1
npm install -g nrm
查看所有可用源:
1
2
3
4
5
6
7nrm 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切换源:
1
nrm use taobao
查看当前使用源
1
npm get registry
cnpm(opens new window)
安装:1
npm install -g cnpm --registry=https://registry.npm.taobao.org
两种比较方便的方式切换 npm 源:
|