npm yarn 镜像地址设置

是因为网络不好导致的下载超时
1、更改下载地址

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

npm config set disturl https://npm.taobao.org/dist


2、对node-sass镜像源进行设置

yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass


PS D:\zxy\code\jeecg\jeecg-boot-master\ant-design-vue-jeecg> yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
yarn config v1.22.10
success Set "sass-binary-site" to "http://npm.taobao.org/mirrors/node-sass".
Done in 0.08s.

3、超时时间设置

yarn config set network-timeout 300000

posted on 2022-01-21 15:17  菜鸟丫丫  阅读(598)  评论(0编辑  收藏  举报

导航