最近大家在使用yarn的时候出现下面这种提示的频率越来越高了:
    例如:info There appears to be trouble with your network connection. Retrying…

    问题描述:
    话不多说,有图有真相,没代码靠边站:

    原因分析:
    info There appears to be trouble with your network connection. Retrying… 信息:网络连接似乎出了点问题,请重试… 但你仔细检查下来,自己的网络似乎并没有什么问题,网络一切正常,那么心机之蛙,一直摸你肚子,问题就很可能出现在了代理连接上。
    解决方案:
    更换安装依赖的镜像,使用淘宝镜像安装,代码如下:
    1、安装好后更换淘宝镜像

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

    2、移除原代理

    1. yarn config delete proxy
    2. npm config rm proxy
    3. npm config rm https-proxy

    3、安装cnpm镜像并使用代理registry

    1. 安装cnpm镜像
    2. npm install -g cnpm --registry=https://registry.npm.taobao.org
    3. 使用代理registry
    4. npm config set registry https://registry.npm.taobao.org

    原文链接:https://blog.csdn.net/weixin_45538576/article/details/109526717