npm 的镜像地址
- 官方镜像
https://registry.npmjs.org/
- 淘宝镜像
registry https://registry.npm.taobao.org/
- cnpm镜像地址
https://r.cnpmjs.org/
- 阿里云镜像地址
https://npm.aliyun.com
设置镜像
# 设置淘宝镜像源
npm config set registry https://registry.npm.taobao.org/
#查看当前使用镜像
npm config get registry
# 临时使用官方镜像下载
npm install --registry=https://registry.npmmirror.com
# 配置文件修改地址
# 找到 ~/.npmrc 文件,将地址粘贴上去
registry = https://registry.npm.taobao.org