vue中yarn install报错:info There appears to be trouble with you

时间:2023-03-30

问题描述

使用 yarn install 的时候报以下错误
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…

解决办法

1、网络连接有问题,检查自己的网络是否正常
2、若网络正常,那问题可能出现在代理连接上
3、控制台输入命令 yarn config get registry,查看当前镜像源是不是淘宝源。
3.1. 如果不是淘宝镜像源,就通过命令 yarn config set registry https://registry.npm.taobao.org 将当前镜像源设置为淘宝镜像
3.2.然后重新执行 yarn install
4、如果以上步骤还未解决,那就重新配置
4.1. 安装好后更换淘宝镜像 yarn config set registry https://registry.npm.taobao.org
4.2. 移除原代理
 yarn config delete proxy
  npm config rm proxy
 npm config rm https-proxy

4.3. 安装 cnpm 镜像并使用代理 registry
  安装 cnpm 镜像
    npm install -g cnpm --registry=https://registry.npm.taobao.org
  使用代理 registry
    npm config set registry https://registry.npm.taobao.org
4.4. npm install
 
上一篇:node.js安装依赖包 yarn install info No lockfile found 下一篇:没有了

相关文章