1.检查镜像源配置:
pnpm config get registry
如果配置不正确,可以使用以下命令更改为正确的镜像源
淘宝 NPM 镜像(npmmirror)
pnpm config set registry https://registry.npmmirror.com/
中国科技大学 (USTC) 镜像
pnpm config set registry https://mirrors.ustc.edu.cn/npm/
清华大学 TUNA 镜像
pnpm config set registry https://registry.tuna.tsinghua.edu.cn/npm/
华为云镜像
pnpm config set registry https://mirrors.huaweicloud.com/repository/npm/
2.清除缓存:
pnpm store prune