Skip to content![]()
扫码开始移动端阅读
npm源笔记
共
158
字 需要≈
0.79
分钟 web
国内镜像
修改成腾讯云镜像源
sh
npm config set registry http://mirrors.cloud.tencent.com/npm/1
修改成淘宝镜像源
sh
npm config set registry https://registry.npmmirror.com1
修改成华为云镜像源
sh
npm config set registry https://mirrors.huaweicloud.com/repository/npm/1
还原成NPM默认镜像
sh
npm config set registry https://registry.npmjs.org/1
验证命令
sh
npm config get registry1
通过使用淘宝定制的cnpm安装
- 安装cnpm
sh
npm install -g cnpm --registry=https://registry.npmmirror.com1
- 使用cnpm
sh
cnpm install xxx1
包管理工具
Npm
在安装nodeJs 以后就会自动安装好Npm
pNpm
sh
npm install -g pnpm1
Yarn
sh
npm install --global yarn1
PNPM
sh
npm install -g pnpm1
转载请注明来源:leelaa : 《npm源笔记》