当前位置: 云海天教程网 > 技术新闻 > 前端开发 > 正文 npm使用国内淘宝镜像的方法 作者: 佚名 来源: 网络转载 时间:2020-03-04 1. 命令 npm config set registry https://registry.npm.taobao.org 2. 验证命令 npm config get registry 如果返回https://registry.npm.taobao.org,说明镜像配置成功。 二、通过使用cnpm安装 1. 安装cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org 2. 使用cnpm cnpm install xxx