pnpm 设置最新的阿里云镜像
nbstudy 发表于 2024-08-06 10:49:58
根据最新的信息,淘宝npm 镜像的地址已更新为https://registry.npmmirror.com/
设置pnpm使用国内镜像源的步骤如下:
bash
# 查询当前使用的镜像源
pnpm get registry
# 设置为淘宝镜像源
pnpm config set registry https://registry.npmmirror.com/
# 还原为官方镜像源
pnpm config set registry https://registry.npmjs.org/
通过以下命令可以验证pnpm是否成功切换到指定的镜像源:
bash
pnpm get registry
如果输出的地址是设置的国内镜像源地址,则表示设置成功。