npm使用淘宝镜像
一.通过命令配置
- 命令
npm config set registry https://registry.npm.taobao.org - 验证命令
npm config get registry
如果返回https://registry.npm.taobao.org,说明镜像配置成功。
二、通过使用cnpm安装
- 安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org - 使用cnpm
cnpm install xxx

浙公网安备 33010602011771号