备忘: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
posted @ 2024-03-05 09:50  网无忌  阅读(65)  评论(0编辑  收藏  举报