#安装pnpm
npm install --global pnpm
# 查看当前源
pnpm config get registry
#临时更换源
pnpm add package-name --registry=https://registry.npmmirror.com/
#永久更换国内源
pnpm config set registry https://registry.npmmirror.com/
#还原默认源
pnpm config set registry https://registry.npmjs.org/
#清理缓存
npm cache clean --force
#清理全局缓存
pnpm store prune
#npm 切换国内镜像
npm config set registry https://registry.npmmirror.com/