Yarn: 您的网络连接似乎有问题。 正在重试...

创建于 2017-11-09  ·  109评论  ·  资料来源: yarnpkg/yarn


➜  fuc git:(master) yarn install
yarn install v1.3.2
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
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...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "http://npm.byted.org/debug/-/debug-2.6.9.tgz: getaddrinfo ENOTFOUND npm.byted.org npm.byted.org:80".
info If you think this is a bug, please open a bug report with the information provided in "/Users/Jimmy/reactjs/react-native/fuc/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
➜  fuc git:(master) ✗

我克隆了一个项目,然后查看了yarn.lock的值,包密钥“ resolved”(以“ http://npm.byted.org ”开头)。

我认为这是作者自定义的yarn注册表,但是我无法访问“ http://npm.byted.org ”,但是yarn config不能解决它

triaged

最有用的评论

为其他Google员工添加此评论:对我有用的是增加Yarn网络超时:

yarn add YourPackageHere --network-timeout 100000

显然我安装的软件包太大(或我的网络太慢),因此它认为这是网络问题。 可能是这样,但这解决了它。 刚花了一段时间。

所有109条评论

您的意思是“但是纱线配置没有解决”? 你尝试了什么?

预期:
如果无法访问“ yarn.lock已解决”,我可以忽略yarn.lock中的“已解决”并使用“ yarn配置注册表”进行安装。

怀疑:
还是建议我删除锁定文件?

对不起,请原谅,我的英语不好。

对不起,请原谅,我的英语不好。

只要我能理解,这不是问题。 而且,我也不是很好good

这不是错误。 这是预期的行为。 您可以删除yarn.lock文件和yarn install 。 或者,如果您需要确切的软件包,则可以在yarn.lock文件中用https://registry.yarnpkg.com替换http://npm.byted.org

为其他Google员工添加此评论:对我有用的是增加Yarn网络超时:

yarn add YourPackageHere --network-timeout 100000

显然我安装的软件包太大(或我的网络太慢),因此它认为这是网络问题。 可能是这样,但这解决了它。 刚花了一段时间。

我现在也遇到了这个问题。 前面提到的解决方案似乎都不起作用。 互联网仍然可以正常工作,在我正在工作的协同工作空间中,似乎没人遇到任何网络问题?

yarn install --network-timeout 1000000
为我做了把戏:

⇒  yarn install --network-timeout 1000000
yarn install v1.3.2
[1/4] 🔍  Resolving packages...
warning react-native > [email protected]: connect 2.x series is deprecated
warning react-native > fbjs-scripts > [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "jest-expo > [email protected]" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0".
[4/4] 📃  Building fresh packages...
success Saved lockfile.
✨  Done in 234.36s.

弄清楚是错误的。 我的一个依赖项(react-native本身)具有
错误的值,并卡在那里。 花了我一段时间才意识到,因为它
不会在错误报告中显示,而仅在yarn命令处于
运行它会弹出一会儿。

在2018年1月17日10:54,“ Sandino” [email protected]写道:

纱线安装--network-timeout 1000000
为我做了把戏:

⇒纱线安装--network-timeout 1000000
纱线安装v1.3.2
[1/4]🔍解决包裹...
警告react-native> [email protected]:不推荐使用connect 2.x系列
警告react-native> fbjs-scripts> [email protected] :不推荐使用gulp- https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5上的指南进行替换
[2/4 https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5%5B2/4]🚚正在获取软件包...
[3/4]🔗链接依赖项...
警告“ jest-expo> [email protected] ”具有未满足的对等依赖项“ babel-core@^6.0.0 || ^ 7.0.0-alpha || ^ 7.0.0-beta || ^ 7.0.0” 。
[4/4]📃建立新包装...
成功保存锁定文件。
in完成234.36秒。

-
您收到此邮件是因为您发表了评论。
直接回复此电子邮件,在GitHub上查看
https://github.com/yarnpkg/yarn/issues/4890#issuecomment-358179301或静音
线程
https://github.com/notifications/unsubscribe-auth/AJeQ6UFZ6q3OqEIdUXRZKUsuoMFkbJtJks5tLWDzgaJpZM4QXTQJ

同样的问题,增加网络超时可以解决

yarn install --network-timeout 1000000

也许默认超时太小?

我在Windows上遇到相同的问题,设置超时无法解决。 另一方面,npm可以正常工作。

任务:wherehows-网络:纱
纱线安装v1.3.2
[1/5]正在验证package.json ...
[2/5]正在解决包裹...
[3/5]正在获取软件包...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
错误发生意外错误:“ https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz:ESOCKETTIMEDOUT ”。
信息如果您认为这是一个错误,请使用“ /Users/athakwani/Desktop/WhereHows/wherehows-web/yarn-error.log”中提供的信息打开错误报告。
信息请访问https://yarnpkg.com/en/docs/cli/install以获得有关此命令的文档。

失败:生成失败,发生异常。

这里有什么帮助吗?

没有解决方案,或者为什么没有网络问题,但是NETWORK_TIMEOUT的默认值为30秒。 请注意, network-timeout以毫秒为单位,我可能不会将其设置为高于5分钟,否则您的构建将在那里呆约16分钟(1000000ms),这确实存在网络连接问题。

https://github.com/yarnpkg/yarn/search?utf8=%E2%9C%93&q=NETWORK_TIMEOUT&type=

@ HarshulSharma000相同的问题

@marcelori我尝试还原到nodejs 8.9.4(lts),然后尝试使用--network-timeout = 99999,它可以正常工作。
注意:-我使用的是纱线1.4.0

好像yarn试图通过代理进行连接。 以下为我工作:

npm config rm proxy
npm config rm https-proxy

我仍然有这个问题。 增加网络超时无济于事, @ suhailgupta03的代理删除也

同样在这里......

同样在这里

“确实存在网络连接问题。” 我不这么认为。 我有100Mb的互联网。 没有服务有麻烦。 下载完美,VOIP完美,NPM闪耀。 只有纱线,我才有这个……黑暗正在发生。

更新:我做了一些伏都教技巧,现在可以正常工作https://github.com/yarnpkg/yarn/issues/5259#issuecomment -379769451

可能是设计使然。 ~/.yarnrc有一个自动生成的注册表。 也许它背后的VPN或什么?
```
猫〜/ .yarnrc

这是一个自动生成的文件。 不要直接编辑此文件。

纱锁文件v1

注册表“ https://artifactory.some.net/api/npm
lastUpdateCheck 1233305747

我的(看起来注册表地址为空-是否应该包含某些内容?):

=> cat ~/.yarnrc
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1523327705543

但是,直到现在,“伏都教技巧”对我来说还是很棒的。

@adjavaherian可行! 我的公司卡在了我的VPN URL上。 不知道为什么将它设置为那个。 因为我根本不使用VPN进行操作。

@MichelDiz在上面发布的“ voodoo”技巧也为我工作。

那么,如何解决这个问题呢?
我在Windows上遇到了同样的问题。

+1

当您的网络无法访问指定的yarn.lock文件的某些程序包资源时,会发生此类错误。
检查您的yarn.lock文件或删除yarn.lock,然后将npm注册表更改为其他公共目录,然后yarn install

重点是:
不要使用私人注册表。
检查您的网络与注册表的连接。

Yarn version: 
  1.9.4

Node version: 
  9.11.2

Platform: 
  win32 x64

Trace: 
  Error: https://registry.yarnpkg.com/grid-styled/-/grid-styled-4.1.0.tgz: ESOCKETTIMEDOUT
      at ClientRequest.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:138095:19)

:苹果手机:
如果我尝试手动下载-可以

认为这是我的私人代理npm的问题,但很高兴我并不孤单! 发生同样的问题。 如果我复制注册表URL并粘贴在chrome上,它将下载文件。

这对我有用:

$ yarn config删除代理
$ yarn install --network-timeout 1000000

现在遇到了这些麻烦,但是https://registry.yarnpkg.com也没有响应,这可能是普遍停机吗?


编辑:检查https://status.yarnpkg.com/后,我发现我的wifi连接无法以某种方式连接到该特定URL。 其他网站工作正常...更改为移动网络,然后工作了。

为什么使用所有模块的此克隆? 为什么不直接从npm?
何时以及为何下载更多信息?

对我来说,这是因为我在npmjs.org帐户中添加了两个因素auth。

我跑了:

npm logout
npm login

然后填写详细信息,包括MFA OTP请求。 然后,一切又恢复了。

Vadorequest,同样的问题。 使用蜂窝网络时,我会得到一些JSON。 使用wifi网络时显示404。

可能与互联网提供商有关,也许由于某些原因,某些URL被阻止。 我看不出有其他原因导致它无法在wifi上通过4G正常运行的原因。 但这真的很奇怪。

@Vadorequest您解决了您的问题吗? 我也遇到过

并非如此,无法解释。 我刚切换到移动网络,它就起作用了。 现在,我回到了wifi,它也可以正常工作。 也许重新启动网络或切换到另一个网络可能会解决该问题。

我今天开始遇到相同的问题。 删除代理可以为我解决问题。

yarn config delete proxy

它可以在今天下午工作,而无需我删除代理或进行任何调整。

我已经尝试了所有上述选项,但对我没有任何帮助,仍然收到相同的错误。 如下

info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/gulp-cli: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443".

当我用冗长的命令运行命令时,得到以下输出

sudo yarn --verbose global add gulp-cli
yarn global v1.10.1
verbose 0.247 Checking for configuration file "/home/prasad/.npmrc".
verbose 0.247 Found configuration file "/home/prasad/.npmrc".
verbose 0.249 Checking for configuration file "/usr/local/share/.npmrc".
verbose 0.249 Checking for configuration file "/usr/etc/npmrc".
verbose 0.249 Checking for configuration file "/home/prasad/.npmrc".
verbose 0.25 Found configuration file "/home/prasad/.npmrc".
verbose 0.25 Checking for configuration file "/home/prasad/.npmrc".
verbose 0.25 Found configuration file "/home/prasad/.npmrc".
verbose 0.251 Checking for configuration file "/home/.npmrc".
verbose 0.253 Checking for configuration file "/home/prasad/.yarnrc".
verbose 0.254 Found configuration file "/home/prasad/.yarnrc".
verbose 0.254 Checking for configuration file "/usr/local/share/.yarnrc".
verbose 0.254 Found configuration file "/usr/local/share/.yarnrc".
verbose 0.254 Checking for configuration file "/usr/etc/yarnrc".
verbose 0.255 Checking for configuration file "/home/prasad/.yarnrc".
verbose 0.255 Found configuration file "/home/prasad/.yarnrc".
verbose 0.255 Checking for configuration file "/home/prasad/.yarnrc".
verbose 0.255 Found configuration file "/home/prasad/.yarnrc".
verbose 0.256 Checking for configuration file "/home/.yarnrc".
verbose 0.26 current time: 2018-10-02T04:53:47.526Z
verbose 0.263 Checking for configuration file "/usr/local/share/.config/yarn/global/.npmrc".
verbose 0.264 Checking for configuration file "/usr/local/share/.npmrc".
verbose 0.264 Checking for configuration file "/usr/etc/npmrc".
verbose 0.264 Checking for configuration file "/home/prasad/.npmrc".
verbose 0.264 Found configuration file "/home/prasad/.npmrc".
verbose 0.265 Checking for configuration file "/usr/local/share/.config/yarn/global/.npmrc".
verbose 0.265 Checking for configuration file "/usr/local/share/.config/yarn/.npmrc".
verbose 0.265 Checking for configuration file "/usr/local/share/.config/.npmrc".
verbose 0.265 Checking for configuration file "/usr/local/share/.npmrc".
verbose 0.266 Checking for configuration file "/usr/local/.npmrc".
verbose 0.266 Checking for configuration file "/usr/.npmrc".
verbose 0.266 Checking for configuration file "/usr/local/share/.config/yarn/global/.yarnrc".
verbose 0.267 Checking for configuration file "/usr/local/share/.yarnrc".
verbose 0.267 Found configuration file "/usr/local/share/.yarnrc".
verbose 0.267 Checking for configuration file "/usr/etc/yarnrc".
verbose 0.267 Checking for configuration file "/home/prasad/.yarnrc".
verbose 0.268 Found configuration file "/home/prasad/.yarnrc".
verbose 0.268 Checking for configuration file "/usr/local/share/.config/yarn/global/.yarnrc".
verbose 0.268 Checking for configuration file "/usr/local/share/.config/yarn/.yarnrc".
verbose 0.268 Checking for configuration file "/usr/local/share/.config/.yarnrc".
verbose 0.269 Checking for configuration file "/usr/local/share/.yarnrc".
verbose 0.269 Found configuration file "/usr/local/share/.yarnrc".
verbose 0.269 Checking for configuration file "/usr/local/.yarnrc".
verbose 0.269 Checking for configuration file "/usr/.yarnrc".
[1/4] Resolving packages...
verbose 0.367 Performing "GET" request to "https://registry.yarnpkg.com/gulp-cli".
info There appears to be trouble with your network connection. Retrying...
verbose 3.487 Performing "GET" request to "https://registry.yarnpkg.com/gulp-cli".
info There appears to be trouble with your network connection. Retrying...
verbose 6.496 Performing "GET" request to "https://registry.yarnpkg.com/gulp-cli".
info There appears to be trouble with your network connection. Retrying...
verbose 9.505 Performing "GET" request to "https://registry.yarnpkg.com/gulp-cli".
info There appears to be trouble with your network connection. Retrying...
verbose 12.513 Performing "GET" request to "https://registry.yarnpkg.com/gulp-cli".
verbose 12.521 Error: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
error An unexpected error occurred: "https://registry.yarnpkg.com/gulp-cli: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443".
info If you think this is a bug, please open a bug report with the information provided in "/usr/local/share/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

注意:我正在使用Ubuntu 16.04, nodejs:v8.12.0

yarn install --network-timeout 1000000对我有用。

@melkishengue对我
sudo yarn --network-timeout 100000全局添加gulp-cli
还是一样的错误

@prasadram那么如何在yarn global add gulp-cli --network-timeout 100000上呢?

@melkishengue感谢您的回复,但还是没有用

[Java is awesome]:~$ sudo yarn global add gulp-cli --network-timeout 100000
[sudo] password for prasad: 
yarn global v1.10.1
[1/4] Resolving packages...
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...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/gulp-cli: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443".
info If you think this is a bug, please open a bug report with the information provided in "/usr/local/share/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

我在Mac上遇到了相同的问题。 但这似乎与计算机中的DNS设置有关。 我所做的是将DNS服务器手动设置为8.8.8.8(Google DNS)和208.67.222.222(Open DNS),现在已解决。 我可以再次运行“纱线安装”。

我在Mac和Linux上没有问题,仅在Windows上出现过这样的错误。 它也可能与平台有关。

@ yzhe8769您知道如何在ubuntu中更改DNS设置吗? 我也想尝试该选项,因为我尝试了几乎所有选项

经调查解决了问题。 请检查以下是我的分析
当我按下面的命令我不知道主机


curl registry.yarnpkg.com
curl: (6) Couldn't resolve host 'registry.yarnpkg.com'

我在LAN和OS上使用桌面是ubuntu 16.04,但在Mac中相同的命令运行正常
然后意识到这不是纱线,所以我在etc文件夹的resolv.conf中添加了google dsn,然后开始正常工作。
希望对别人有帮助

经调查解决了问题。 请检查以下是我的分析
当我打到下面时,我不知道主机


curl registry.yarnpkg.com
curl: (6) Couldn't resolve host 'registry.yarnpkg.com'

我在LAN和OS上使用桌面是ubuntu 16.04,但在Mac中相同的命令运行正常
然后意识到这不是纱线,所以我在etc文件夹的resolv.conf中添加了google dsn,然后开始正常工作。
希望对别人有帮助

都好。 因此,如果有人也遇到此问题,那可能是因为DNS设置阻止了纱线注册表的解析

指定另一个用于缓存的文件夹解决了我的环境中的问题:

export YARN_CACHE_FOLDER=/tmp/.cache

我已经尝试了你们建议的一切,但仍然收到错误


> yarn install --network-timeout 1000000
> yarn install v1.7.0
> [1/4] Resolving packages...
> [2/4] Fetching packages...
> 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...
> info There appears to be trouble with your network connection. Retrying...
> info There appears to be trouble with your network connection. Retrying...
> error An unexpected error occurred: "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.328.0.tgz: read ECONNRESET".
> info If you think this is a bug, please open a bug report with the information provided in "C:\\Git\\broadvoice.communicator\\yarn-error.log".
> info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> info There appears to be trouble with your network connection. Retrying...
> info There appears to be trouble with your network connection. Retrying..

  • 1Gbps互联网(持续900Mbit的测试,零丢包)
  • Ubuntu 18.04
  • 纱1.10.1
  • nodejs v8.10.0

我也收到这些虚假的网络错误。

``
$纱线安装
纱线安装v1.10.1
[1/4]解决包裹...
[2/4]正在获取软件包...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
错误发生意外错误:“ https://registry.yarnpkg.com/@fortawesome/free -solid-svg-icons /-// free-solid-svg-icons-5.3.1.tgz:ESOCKETTIMEDOUT”。
信息如果您认为这是一个错误,请使用“ [..] / yarn-error.log”中提供的信息打开一个错误报告。
信息请访问https://yarnpkg.com/en/docs/cli/install以获得有关此命令的文档。
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...


Repeating with a `--network-timeout` didn't help.

$ yarn install --network-timeout = 10000
纱线安装v1.10.1
[1/4]解决包裹...
[2/4]正在获取软件包...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
...
```

network-timeout记录在任何地方? Google没给我任何东西。

@torifat您可以考虑重新打开此问题。 这里的问题全是“信息”。您的网络连接似乎有问题。 正在重试...”消息。 无论您是否有锁定文件,这些都会发生。 如果删除yarn.lock文件,我仍然会收到这些消息。 如果删除纱线缓存并锁定文件。 我得到更多。

PR#6413似乎已重现了此错误消息问题,该问题最近由于重传机制或远程npm注册表问题而添加了此消息,作为重试机制的一部分,通常无济于事。 注册表似乎是一个先天性问题,导致重试,而这些消息也浮出水面。
https://github.com/yarnpkg/yarn/pull/6413/files#diff -5d246f90b159bd84bbc99f67527b1a0eR401

看来问题出在这条消息实际上是误导的。

1Gbps互联网
Ubuntu 18.04
纱1.10.1
nodejs v8.10.0

没有锁定文件:

$ yarn install --network-timeout=30000
yarn install v1.10.1
info No lockfile found.
[1/4] Resolving packages...
warning @vue/cli-service > webpack-bundle-analyzer > [email protected]: Switch to the `bfj` package for fixes and new features!
[2/4] Fetching packages...
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...
...

没有缓存或锁定文件:

yarn install --network-timeout=30000
yarn install v1.10.1
info No lockfile found.
[1/4] Resolving packages...
warning @vue/cli-service > webpack-bundle-analyzer > [email protected]: Switch to the `bfj` package for fixes and new features!
[2/4] Fetching packages...
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...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.4.1.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "[..]/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...

@arcanis告诉我,当重试是由npm注册表引起的时,yarn 1.11+将有一个更准确的消息,因为#6413还包括不在1.1.1.x纱线中的新的,更准确的消息。

internalServerErrorRetrying: 'There appears to be trouble with the npm registry (returned $1). Retrying...'

@whereisaaron能否请您发行新刊物? 我认为最好创建一个新的版本,而不是用很多评论复活一个旧的版本。

当然@torifat; 我不想继续犯重复的问题。 但是,现在可能会在1.11版本发布时解决此问题,所以让它保持关闭状态,如果1.11仍然有任何问题,我将专门针对该版本发布一个新版本。

甚至即时通讯都面临这个问题。

甚至我在1.12.1版本中也面临问题(2)。

在运行docker build时,我的情况发生了,其中基本映像从FROM node:10-alpine升级到node:11.1.0-alpine

由于我想将节点11保留为基本映像,因此必须将命令从yarn迁移到npm

我可以确认这是在Windows 10下用纱线1.12.3和节点11.1.0

当我将node-version改回8.12.0一切正常,没有问题(或“麻烦”)。 (我通过nvm-windows更改了版本)

Windows 10,Yarn 1.12.3,NodeJs 11.1.0

解决我问题的方法是将网络超时时间增加到60秒。

我遇到了同样的错误。
尝试npm config set registry=https://registry.npmjs.com/
这对我有用。

好像yarn试图通过代理进行连接。 以下为我工作:

npm config rm proxy
npm config rm https-proxy

它对我有用

正在收到相同的错误。
此处发布的解决方案均无济于事。 重新启动我的计算机“修复”了它。

我也收到此错误。 用--verbose重新运行安装告诉我,这是导致问题的"https://registry.yarnpkg.com/@expo/traveling-fastlane-darwin/-/traveling-fastlane-darwin-1.7.1.tgz

我尝试在Chrome中访问它-确实已经下载了-但后来以100%的速度挂了一段时间。 这通常在扫描时发生。 这是一个很大的目标。

看吧,禁用Windows Defender实时扫描,它可以正常工作。 看来,如果病毒扫描时间太长,Yarn会将其归类为网络问题。

TLDR:如果您使用的是Windows,请尝试禁用实时扫描并重新安装。

我也遇到了此错误,在正常后使用sudo yarn

E:\ javascript \ React \ confusion>纱线添加时刻
纱线添加v1.13.0
[1/4]解决包裹...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
信息您的网络连接似乎有问题。 正在重试...
错误发生意外错误:“ http://registry.npmjs.org/moment:getaddrinfo ENOTFOUND域domain:8080 ”。
信息如果您认为这是一个错误,请使用“ E:\ javascript \ React \ confusion \ yarn-error.log”中提供的信息打开错误报告。
信息请访问https://yarnpkg.com/en/docs/cli/add以获取有关此命令的文档。

请帮忙。
面临同样的问题。

如果你有问题

信息您的网络连接似乎有问题。 正在重试...

我认为您必须配置代理
使用这些命令;

纱线配置设置代理http:// username:password @ host :port
纱线配置设置https-proxy http:// username:password @ host :port

更改注册表似乎为我解决了这个问题:

yarn install --registry https://registry.npmjs.org

我在Windows中遇到了同样的问题,并且增加了网络超时为我解决了它! 谢谢

同样的错误。 要解决此问题,只需擦除yarn.lock并运行yarn命令即可重新创建。

如果你有问题

信息您的网络连接似乎有问题。 正在重试...

我认为您必须配置代理
使用这些命令;

纱线配置设置代理http:// username:password @ host :port
纱线配置设置https-proxy http:// username:password @ host :port

解决了这个问题,谢谢:-)

我昨天遇到了这个问题,我无法用毛线检索@material-ui/icons 。 我已经尝试过此线程的建议(网络超时,更改注册表,删除node_modules并重新安装)。 但是,使用npm安装成功完成。

如果直接访问包URL,则可以在浏览器中下载它(只有1.2MB)。 不知道是什么阻碍了纱线。

@material-ui/icons也有同样的问题。 无论是Windows原生纱线还是在wsl下运行的纱线(无论是否扩展了网络超时或禁用完整性检查),都没有任何区别。 同样,我可以简单地在浏览器中下载文件。 Npm安装正常。

从软件包中删除@material-ui/icons也会为我解决问题。

我今天得到了完全相同的@material-ui/icons问题。 我删除了项目中与yarn相关的所有内容,以通过在bash中执行rm -rf node_modules yarn.lock来解决此问题。 删除过程完成后,我运行了yarn命令。 问题解决了,此后我没有看到任何错误。

是的@mustaphaturhan我今天在@ material-ui / icons上也遇到了完全相同的问题...以相同的方式解决了它。 :\

删除~/.yarnrc对我有用

我认为这只是在软件包很大或包含很多文件时发生的(我也经常在fontawesome的图标软件包中看到此消息)。
也许时间限制不是检查此问题的最佳方法。 如果超过了时间限制,您还可以进行1kb-test-ping。 只有失败了,您才可以进行重试,否则一切正常,只需要更长的时间。

我仍然无法安装install @material-ui/icons 。 我删除了node_modulesyarn.lock并运行yarn cache clean ,将节点升级到10.16.0并重新安装了yarn 。 我在Windows 10上。

奇怪的是,如果将项目克隆到temp目录中,则可以成功安装所有软件包。 问题出现在我的工作区中。 我在寻找隐藏文件,看不到任何文件。 仍然看到:

Error: https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.2.1.tgz: ESOCKETTIMEDOUT`
  at ClientRequest.<anonymous> (C:\Users\<user>\AppData\Roaming\nvm\v10.16.0\node_modules\yarn\lib\cli.js:130217:19)

将项目切换到npm

我遇到了同样的问题,因为npm以某种方式将我的代理配置为准备好apple.asd (不确定如何,我没有这样做)。 我做了yarn config list并以此方式确定了设置。 删除后,它起作用了。

如果您只有ip6网络并且出现错误,则可以尝试通过添加解决方法

2606:4700::6810:1723 registry.yarnpkg.com
2606:4700::6810:1723 registry.npmjs.org
2606:4700::6810:ab63 yarnpkg.com

到/ etc / hosts。 您可以使用nslookup registry.yarnpkg.com获得ip6。 https://github.com/yarnpkg/yarn/issues/6031

我有一个非常相似的问题,可通过卸载并重新安装node / npm来解决

对我来说,我只删除了npm和yarn lockfile并再次运行yarn install

在Windows 10上也有@material-ui/icons问题。正如@stewartml建议的那样,禁用Windows Defender的实时保护就可以解决问题。

你可以做
npm config rm代理
npm config rm https-proxy
用于删除任何代理
或者,如果您想使用代理,可以执行此操作
$ yarn config set proxy http:// my_company_proxy_url :port
$ yarn config set https-proxy http:// localhost :3128

或使超时600000也许z文件很大
纱线配置设置网络超时600000 -g

或者,如果您想保留默认超时,请执行此操作
纱线添加--network-timeout 100000

rm -rf /Users/xxx/.config/yarn/global/yarn.lock
然后完成

通过重启解决:D

就我而言,它是通过在Windows 10上关闭AdGuard和Windows Defender来工作的。我也使用此命令。

纱线安装--network-timeout 1000000

我仍然有这个问题。增加网络超时无济于事,@ suhailgupta03的代理删除也无济于事。现在,yarn不会安装,添加或做任何事情。我已经通过三个不同的网络进行了尝试。

Adding time didn't solve my problem. It still existed and I didn't solve it

npm config rm代理
npm config rm https-proxy

希望以上命令对您有所帮助。

image
仍然有问题。

image
网络速度获取不正确。

image
网络速度获取不正确。

为什么关闭? 这仍然是一个问题。 为什么? 在许多项目中,它困扰了我的机器长达数周之久。

@allthesignals这里报告的大多数问题是各种配置问题。 我自己有杂项。 例如配置问题。 设置不正确的代理之类的事情很重要。 没有办法轻松解决此问题,因为这是怪异的互联网问题的通电话。

好的,谢谢@ezfe。 我确实认为该信息对某些人的情况不正确。

例如:

我认为这只是在软件包很大或包含很多文件时发生的(我也经常在fontawesome的图标软件包中看到此消息)。
也许时间限制不是检查此问题的最佳方法。 如果超过了时间限制,您还可以进行1kb-test-ping。 只有失败了,您才可以进行重试,否则一切正常,只需要更长的时间。

我有同样的问题。 实际上,我在运行流式视频进程(netflix)时正在运行命令。 因此,我只是暂停了它,然后再次重试,它甚至没有将超时设置为无限值就可以正常工作。

我遇到了同样的问题,但是直到删除本地存储库中的node_modules目录,我才注意到它。
然后,我开始看到网络错误。 显然,我的package.json中有一个旧程序包,它引用了位于公司防火墙后面的程序包(我也不在VPN上)。 一旦我从package.json中删除了有问题的包,一切就可以正常工作。

我遇到了同样的问题,我的解决方案是更新节点版本,问题消失了。

再来一次

verbose 0.942 Performing "GET" request to "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz".
verbose 1.047 Performing "GET" request to "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz".
[##########################################################################################] 950/

它只是挂在最后两个请求上。

我在纱线版本上也遇到这个问题-> 1.15.2

您不应该解决问题,除非您解决问题或将可能发生的问题通知他人。

我在构建docker映像时跑了毛线,遇到了与上述相同的问题。 重新启动docker守护程序为我解决了它。

rm -rf /Users/xxx/.config/yarn/global/yarn.lock

@xdkaka谢谢,这对我yarn.lock了一些旧的私有存储库URL。

--network-timeout 1000000为我修复了它,但是花了很长时间才安装了一个软件包-@ material-ui / icons

就我而言,我删除了yarn.lock文件。 然后它运作良好。

yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
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...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/npm/-/npm-6.14.8.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/Users/runner/work/timelapser/timelapser/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Github Actions,MacOS赛跑者。

yarn install --network-timeout 1000000
为我做了把戏:

⇒  yarn install --network-timeout 1000000
yarn install v1.3.2
[1/4] 🔍  Resolving packages...
warning react-native > [email protected]: connect 2.x series is deprecated
warning react-native > fbjs-scripts > [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "jest-expo > [email protected]" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0".
[4/4] 📃  Building fresh packages...
success Saved lockfile.
✨  Done in 234.36s.

它为我工作! 非常感谢您

我猜没有针对这个错误的“一刀切”解决方案。 以我为例,我的i5计算机上有一个cyberark进程正在占用所有资源。 我强行结束了该过程,错误消失了。 我认为这与防病毒有关。 我敢肯定,当我重新启动电脑时,它会来的。 这样浪费时间在窗户上工作。

当我尝试在docker中安装yarn时遇到相同的问题

Step 6/10 : COPY package.json yarn.lock ./
 ---> 72e0f798190d
Step 7/10 : RUN yarn --frozen-lockfile --check-files
 ---> Running in de083b1b3bac
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
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...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/escape-regexp/-/escape-regexp-0.0.1.tgz: ETIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The command '/bin/sh -c yarn --frozen-lockfile --check-files' returned a non-zero code: 1
Error: Process completed with exit code 1.
此页面是否有帮助?
0 / 5 - 0 等级