Skip to content

验证当前NPM源地址

sh
pnpm config get registry

国内镜像

sh
pnpm config set registry http://mirrors.cloud.tencent.com/npm/
sh
pnpm config set registry https://registry.npmmirror.com
sh
pnpm config set registry https://mirrors.huaweicloud.com/repository/npm/

恢复默认源

sh
pnpm config set registry=https://registry.npmjs.org

通过使用淘宝定制的cnpm安装

sh
pnpm install -g cnpm --registry=https://registry.npmmirror.com   # 安装cnpm
cnpm install xxx    # 使用cnpm