作为一个备份。

一、Yarn 设置淘宝镜像
1.查询当前配置的镜像

1
yarn config get registry  // 默认:https://registry.yarnpkg.com

2.设置成淘宝镜像

1
yarn config set registry http://registry.npm.taobao.org/

3.换成原来的

1
yarn config set registry http://registry.npmjs.org/

二、NPM设置淘宝镜像
1.查询当前配置的镜像

1
npm get registry

2.设置成淘宝镜像

1
npm config set registry http://registry.npm.taobao.org/

3.换成原来的

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

————————————————

版权声明:本文为CSDN博主「Handada_fan」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_39441438/article/details/121517210