有时我们需要在taobao源和官方npm源之前做切换,每次去设置比较麻烦。
使用nrm可以很方便的做切换的操作
- 安装nrm
npm install -g nrm
- 执行命令查看可选的源
nrm ls
// 查看到的结果列表
* npm -------- https://registry.npmjs.org/
yarn ------- https://registry.yarnpkg.com/
cnpm ------- http://r.cnpmjs.org/
taobao ----- https://registry.npm.taobao.org/
nj --------- https://registry.nodejitsu.com/
- 切换到taobao源
nrm use taobao
完工!!!
网友评论