备忘:npm 和 yarn 的常用源设置
NPM:
### 1、查看当前源:
npm config get registry
### 2、恢复官方源:
npm config set registry https://registry.npmjs.org
### 3、设置镜像源:
npm config set registry https://registry.npmmirror.com
### 4、设置淘宝源:
npm config set registry https://registry.npm.taobao.org
YARN:
### 1、查看当前源:
yarn config get registry
### 2、恢复官方源:
yarn config set registry https://registry.yarnpkg.com
### 3、设置镜像源:
yarn config set registry https://registry.npmmirror.com
### 4、设置淘宝源:
yarn config set registry https://registry.npm.taobao.org
版权声明: 本文为博主 网无忌 原创文章,欢迎转载,但请务必标注原文链接。