[英]NPM: request to https://registry.npmjs.org/corepack failed, reason: connect EHOSTUNREACH
NPM used to work no problem but now for some reason anything I try to do that involves connecting to the registry times out. NPM 过去工作没问题,但现在由于某种原因,我尝试做的任何涉及连接到注册表的操作都会超时。
The failure message I get from NPM is request to https://registry.npmjs.org/corepack failed, reason: connect EHOSTUNREACH 2606:4700::6810:1223:443
我从 NPM 收到的失败消息是
request to https://registry.npmjs.org/corepack failed, reason: connect EHOSTUNREACH 2606:4700::6810:1223:443
The command I'm running is npm update -g
.我正在运行的命令是
npm update -g
。
I'm on Arch Linux, and I installed the NPM package from arch.我在 Arch Linux 上,我从 arch 安装了 NPM package。 It is version 8.19.2 (the latest on arch).
它是版本 8.19.2(arch 上的最新版本)。
I tried two DNS, the one I'm using now is Cloudflare (1.1.1.1).我尝试了两个 DNS,我现在使用的是 Cloudflare (1.1.1.1)。
Pinging "registry.npmjs.org" results in From 2600:1700:4630:c000::1 (2600:1700:4630:c000::1) icmp_seq=1 Destination unreachable: Address unreachable
Pinging "registry.npmjs.org" 结果
From 2600:1700:4630:c000::1 (2600:1700:4630:c000::1) icmp_seq=1 Destination unreachable: Address unreachable
But if I go to registry.npmjs.org in my web browser, I get the expected json result.但是如果我在我的 web 浏览器中 go 到 registry.npmjs.org,我会得到预期的 json 结果。
Any help is appreciated.任何帮助表示赞赏。
https://askubuntu.com/questions/32298/prefer-a-ipv4-dns-lookups-before-aaaaipv6-lookups/38468#38468 https://askubuntu.com/questions/32298/prefer-a-ipv4-dns-lookups-before-aaaaipv6-lookups/38468#38468
For some reason ipv6 requests are not working on my current.network.出于某种原因,ipv6 请求在我的 current.network 上不起作用。 I "solved" the issue for now by preferring ipv4 using the solution in the link above.
我现在通过使用上面链接中的解决方案更喜欢 ipv4 “解决”了这个问题。 Ultimately I'd like to find out why ipv6 is not working on my computer.network but for now this is fine.
最后我想找出为什么 ipv6 不能在我的 computer.network 上工作,但现在这很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.