无法使用梯子。只能使用淘宝镜像
npm config set registry https:"//registry.taobao.org"
用完要恢复
npm config set registry https:"//registry.npmjs.org"
当然具体也可以使用
npm config //查看相关命令
npm config edit //win会弹出个text。然后查看registry,自己修改吧modified
npm delete registry
npm distable url //没有试过。
还是安利一个 nrm 🙌npm 推荐的
使用usage
npm install -g nrm
nrm ls //查看。
nrm use cnpm //这样就使用了 cnpm --- http://r.cnpmjs.org/
测试
nrm test
还是taobao快囧
具体