◆ 模塊作用:
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/