◆ 模块作用:
nrm ( npm registry manager ),npm下载地址切换工具。npm默认的下载地址在国外,国内下载速度慢,可以使用nrm模块切换到国内的下载地址。
◆ 使用步骤:
- 使用npm install nrm -g 下载
F:\workstation\nodejs> npm install nrm -g
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
C:\Users\ASUS\AppData\Roaming\npm\nrm -> C:\Users\ASUS\AppData\Roaming\npm\node_modules\nrm\cli.js
+ [email protected]
added 489 packages from 861 contributors in 42.519s
- 查询可用下载地址列表 nrm ls
F:\workstation\nodejs> 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/
npmMirror -- https://skimdb.npmjs.com/registry/
edunpm ----- http://registry.enpmjs.org/
- 切换npm下载地址 nrm use 下载地址名称
F:\workstation\nodejs> nrm use taobao
Registry has been set to: https://registry.npm.taobao.org/