node.js更换镜像源

时间:2020-12-15 11:45:50   收藏:0   阅读:5

1、首先输入 npm get registry 查看当前镜像源,默认为 https://registry.npmjs.org/(npm默认镜像源)

2,修改镜像源 npm config set registry xxx(镜像源地址)

  国内一般使用淘宝镜像源 npm config set registry https://registry.npm.taobao.org

3,npm 修改成功,输入 npm get registry 再次查看镜像源

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!