安装

安装 nrm 命令 (记忆 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/ npmMirror https://skimdb.npmjs.com/registry/ edunpm - http://registry.enpmjs.org/

怎样设置npm和cnpm环境变量(如何在已设置的npm淘宝镜像中进行切换)(1)

切换命令:(此处选择cnpm

nrm use cnpm

更多操作https://www.npmjs.com/package/nrm

,