转自:https://www.cnblogs.com/nuomibaibai/p/16470559.html
npm 源地址设置及恢复
设置国内淘宝镜像
通过cnpm使用淘宝镜像:
npm install -g cnpm --registry=https://registry.npm.taobao.org
将npm设置为淘宝镜像:
npm config set registry https://registry.npm.taobao.org
查看当前npm源
npm config get registry
查看当前cnpm源
cnpm config get registry
如果设置了npm为淘宝镜像,需要恢复为默认源时:
npm config set registry=https://registry.npmjs.org
设置之后,记得通过npm config get registry 查看源是否设置成功
更多精彩内容:各种AI课程、技能课程、黑科技软件、网站小程序源码、副业小项目、PPT模板等精品素材、电商课程、推广引流课程等,尽在 天边资源网 。