Yarn: Error: connect ECONNREFUSED 127.0.0.1:443

Yarn: Error: connect ECONNREFUSED 127.0.0.1:443

当我通过 yarn 安装 ELM 时,我得到

-- ERROR -----------------------------------------------------------------------

Something went wrong while fetching the following URL:

https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz

It is saying:

Error: connect ECONNREFUSED 127.0.0.1:443

NOTE: You can avoid npm entirely by downloading directly from: https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz

当我手动浏览到 https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz 时。我得到

但是其他人可以访问 link 并且它会下载文件。

编辑:

主机文件:

127.0.0.1 view-localhost # view localhost server

127.0.0.1 mydevsnapcap.com www.mydevsnapcap.com app.mydevsnapcap.com internal.mydevsnapcap.com

0.0.0.1 mssplus.mcafee.com

编辑 这用于几天前的工作。

更多测试: 我无法使用光纤连接从我的 phone 和电脑访问它,但我可以使用我的移动连接在我的 phone 和移动设备上访问它。

您的计算机或网络中的某些东西正在将域 github.com 解析为 127.0.0.1,即本地主机。因此,每次您尝试此访问时,它都会尝试在您发出请求的同一台计算机上访问服务 运行。

检查您的 DNS 设置。

检查 hosts 文件中是否没有 github.com 的条目(在 Windows C:\Windows\System32\drivers\etc\hosts 上,其他地方 /etc/hosts).

如果您的网络上 运行 类似于 Pi-Hole,请检查它是否未捕获 github.com

原来是我的 ISP 出于某种原因阻止了 link。我切换到使用 google dns,一切都很好:https://developers.google.com/speed/public-dns/docs/using