Loading

npm和yarn设置淘宝镜像

NPM 设置淘宝镜像

1.查询当前配置的镜像

npm get registry

# https://registry.npmjs.org/
``` 

设置成淘宝镜像
```bash
npm config set registry https://registry.npm.taobao.org/

2.换成原来的

npm config set registry https://registry.npmjs.org/

Yarn 设置淘宝镜像

1.查询当前配置的镜像

yarn config get registry

# https://registry.yarnpkg.com

设置成淘宝镜像

yarn config set registry https://registry.npm.taobao.org/
posted @ 2021-08-01 12:33  谢小舜  阅读(152)  评论(0)    收藏  举报