sudo npm install -g nrm --registry=https://registry.npm.taobao.org
装上后直接 cnpm
zhangchunyue:~ zhangchunyue$ nrm test
- npm ---- 810ms
cnpm --- 258ms
taobao - 330ms
nj ----- Fetch Error
rednpm - 131ms
npmMirror 1201ms
edunpm - Fetch Error
zhangchunyue:~ zhangchunyue$ nrm use cnpm
verb config Skipping project config: /Users/zhangchuny
Registry has been set to: http://r.cnpmjs.org/
zhangchunyue:~ zhangchunyue$ nrm use taobao
verb config Skipping project config: /Users/zhangchuny
Registry has been set to: https://registry.npm.taobao.org/
使用国内镜像装包,先sudo npm install -g nrm --registry=https://registry.npm.taobao.org
,然后 npm i ,这样快一些。