備忘:npm 和 yarn 的常用源設定

网无忌發表於2024-03-05

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

相關文章