Mac的npm镜像地址
时间: 2024-12-09 21:12:16 浏览: 41
在Mac上使用npm时,可以通过配置镜像地址来加快包的下载速度。以下是一些常用的npm镜像地址及其配置方法:
1. **淘宝NPM镜像**:
- 镜像地址:https://registry.npmmirror.com
- 配置方法:
```bash
npm config set registry https://registry.npmmirror.com
```
2. **官方NPM镜像**:
- 镜像地址:https://registry.npmjs.org/
- 配置方法:
```bash
npm config set registry https://registry.npmjs.org/
```
3. **CNPM镜像**:
- 镜像地址:https://r.cnpmjs.org/
- 配置方法:
```bash
npm config set registry https://r.cnpmjs.org/
```
4. **华为云NPM镜像**:
- 镜像地址:https://mirrors.huaweicloud.com/repository/npm/
- 配置方法:
```bash
npm config set registry https://mirrors.huaweicloud.com/repository/npm/
```
5. **腾讯云NPM镜像**:
- 镜像地址:https://mirrors.cloud.tencent.com/npm/
- 配置方法:
```bash
npm config set registry https://mirrors.cloud.tencent.com/npm/
```
配置完成后,可以通过以下命令验证当前使用的镜像地址:
```bash
npm config get registry
```
阅读全文