npm切换淘宝镜像的两种方法

第一种(链接切换):

1.全局切换镜像

 npm config set registry http://registry.npm.taobao.org/
  1. 查看镜像使用状态
npm get registry

3.全局切换回官方

 npm config set registry http://www.npmjs.org

第二种(nrm切换):

1.利用npm 下载nrm

    npm install -g nrm

2.查看可切换的镜像源:

nrm ls

3.切换镜像源(如淘宝):

nrm use taobao

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注