npm使用淘宝镜像源
单次使用
npm install koa --registry=https://registry.npm.taobao.org
使用
npm install koa
全局配置淘宝镜像源
npm config set registry https://registry.npm.taobao.org
查看配置是否成功
npm config get registry
需要换回时改为官方的镜像源
npm config set registry https://registry.npmjs.org
参考:https://www.cnblogs.com/tanyiqu/p/14532462.html
https://www.jianshu.com/p/c35e832a08d8