首页 > 技术文章 > node.js更换镜像源

netyts 2020-12-09 09:05 原文

1、首先输入 npm get registry 查看当前镜像源,

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 再次查看镜像源

npm get registry

推荐阅读