npm使用国内淘宝镜像的方法

amber 4年前 1,810次点击 来自 技术

一.通过命令配置

  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

目前暂无回复

致力于搭建一个分享发现好玩东西的社区京ICP备15052899号-3

本站总访问量 | 本文总阅读量 | 本站总访客数