NPM切换镜像源 nmp/cnpm/yarn

nrm切换npm镜像源

  • 安装

npm install -g nrm

  • 使用

  • 列出可选的源

nrm ls
*npm ---- https://registry.npmjs.org/
 cnpm --- http://r.cnpmjs.org/
 taobao - http://registry.npm.taobao.org/
 eu ----- http://registry.npmjs.eu/
 au ----- http://registry.npmjs.org.au/
 sl ----- http://npm.strongloop.com/
 nj ----- https://registry.nodejitsu.com/

* 号的是当前使用的源

  • 切换

切换到淘宝

nrm use taobao
 Registry has been set to: http://registry.npm.taobao.org/
  • 删除源

nrm del
  • 测试速度

nrm test
  • 配置淘宝镜像

$ npm config set registry https://registry.npm.taobao.org

你可能感兴趣的:(NPM切换镜像源 nmp/cnpm/yarn)