t-d*_*oog 14 react-native yarnpkg
我一直在尝试做本机反应的快速入门指南,但一直收到此错误
There appears to be trouble with your network connection. Retrying...
Run Code Online (Sandbox Code Playgroud)
我的连接正常。
Jos*_*sen 37
yarn config set network-timeout 600000 -g
Run Code Online (Sandbox Code Playgroud)
通常,您的错误是由于达到网络连接时间限制而引起的,而yarn只是报告“您的网络连接出现问题”。
我的答案顶部的代码行将全局纱线网络超时设置为 10 分钟。
较长的网络超时可能是可以的,因为纱线使用缓存,如果它很大而你没有它,你可能希望它继续并花时间下载。
yac*_*ane 25
当您的网络速度太慢或安装的软件包太大时,就会发生这种情况,而Yarn只是认为这是网络问题。尝试增加纱线网络超时:
yarn add <yourPackage> --network-timeout 100000
Run Code Online (Sandbox Code Playgroud)
小智 20
yarn install --network-timeout=30000vim ~/.yarnrc并添加有用的代理设置。小智 7
尝试时遇到了确切的问题yarn install
yarn install --network-timeout 100000
Run Code Online (Sandbox Code Playgroud)
仅使用这个并没有解决我的问题。我一次只能安装大约 5 个软件包。因此,我运行了yarn install多次,一次只使用 package.json 中的几个依赖项。
希望这有帮助
我收到此问题是因为我在公司内部网络中工作,需要设置代理。
$ yarn config set proxy http://my_company_proxy_url:port
$ yarn config set https-proxy http://localhost:3128
example $ yarn config set https-proxy http://proxy.abc.com:8080
Run Code Online (Sandbox Code Playgroud)
简单的工作解决方案(正确的方法):
好像yarn试图通过代理进行连接。以下为我工作:
npm config rm proxy
npm config rm https-proxy
Run Code Online (Sandbox Code Playgroud)
来源:https://github.com/yarnpkg/yarn/issues/4890
以下帮助了我
yarn config delete https-proxy
yarn config delete proxy
Run Code Online (Sandbox Code Playgroud)
他们将您的 https 代理和代理值设置为未定义。我的 https 代理设置为 localhost。使用以下命令检查代理和 https-proxy 配置值是否未定义
yarn config get https-proxy
yarn config get proxy
Run Code Online (Sandbox Code Playgroud)
涉及的大包通常可以是 Material Design 图标。
检查你使用的材料设计的字体material-design-icons在你package.json和删除!
material-design-icons太大而无法处理,material-design-icons-fonts只有在需要它们时才应该使用。
| 归档时间: |
|
| 查看次数: |
12994 次 |
| 最近记录: |