npm源镜像
国内npm源镜像
- npm 官方原始镜像网址是:https://registry.npmjs.org/
- 淘宝 NPM 镜像:http://registry.npmmirror.com
- 阿里云 NPM 镜像:https://npm.aliyun.com
- 腾讯云 NPM 镜像:https://mirrors.cloud.tencent.com/npm/
- 华为云 NPM 镜像:https://mirrors.huaweicloud.com/repository/npm/
- 网易 NPM 镜像:https://mirrors.163.com/npm/
- 中国科学技术大学开源镜像站:http://mirrors.ustc.edu.cn/
- 清华大学开源镜像站:https://mirrors.tuna.tsinghua.edu.cn/
- 腾讯,华为,阿里的镜像站基本上比较全
更换镜像
bash
npm config set registry https://registry.npmmirror.com使用那个镜像,只需要 npm config set registry + 对应的镜像网址就好了
查看当前的镜像源:npm config get registry
bash
npm config get registry