Elm 安装总是失败并出现 "ConnectionTimeout" 错误(在 WSL 中)
Elm install always fails with "ConnectionTimeout" error (in WSL)
我是 Elm 新手。而且我英语不好。所以,如果有什么不明确或者错误的地方,请让我纠正。
------------ 编辑 ------------
我下面的所有问题都在 WSL 上。当我尝试 windows 时,一切正常。那么...为什么 elm install
在 WSL 上不起作用?你有什么想法吗?
-------- 问题 --------
当我尝试 elm-test init
时,它不像下面那样工作
$ elm-test init
Here is my plan:
Add:
elm/random 1.0.0
elm-explorations/test 1.2.2
Would you like me to update your elm.json accordingly? [Y/n]:
-- PROBLEM DOWNLOADING PACKAGE -------------------------------------------------
I was trying to download the source code for elm/random 1.0.0, so I tried to
fetch:
https://github.com/elm/random/zipball/1.0.0/
But my HTTP library is giving me the following error message:
ConnectionTimeout
Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!
但我的浏览器 (Chrome) 运行良好,甚至在 WSL(我 运行 elm-test init
命令所在的环境)中也是如此。
$ curl https://github.com/elm/random/zipball/1.0.0/
https://codeload.github.com/elm/random/legacy.zip/1.0.0<body>You are being <a href="https://codeload.github.com/elm/random/legacy.zip/1.0.0">redirected</a>.</body></html>
然后我也再次尝试重定向 URL
$ curl https://codeload.github.com/elm/random/legacy.zip
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
我认为没有网络问题。我的电脑可以连上repo,估计会下载的很好
我最后只试了 elm install
,这也引发了同样的错误。 Elm 似乎无法连接到 repo,即使我的电脑可以。
$ elm install elm/random
Here is my plan:
Add:
elm/random 1.0.0
Would you like me to update your elm.json accordingly? [Y/n]:
-- PROBLEM DOWNLOADING PACKAGE -------------------------------------------------
I was trying to download the source code for elm/random 1.0.0, so I tried to
fetch:
https://github.com/elm/random/zipball/1.0.0/
But my HTTP library is giving me the following error message:
ConnectionTimeout
Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!
请帮帮我,我该怎么办?
最近有理由使用WSL进行elm开发。这不是很有趣,我很高兴回到 Mac!我发现 WSL 上的某些磁盘操作似乎进行得很慢,这可能会导致各种奇怪的问题。
我使用的是 Webstorm,它不能很好地处理 WSL,所以最后我在 C: 驱动器上(而不是在 /home/...
中)做了所有事情,这样 webstorm 就可以 运行 windows 版本的 elm-format,而我的节点开发环境是 运行 在 linux 层上。
这不是您问题的准确答案,只是说可以做到,但根据我的经验,这不是编写 Elm 代码的理想方式
我是 Elm 新手。而且我英语不好。所以,如果有什么不明确或者错误的地方,请让我纠正。
------------ 编辑 ------------
我下面的所有问题都在 WSL 上。当我尝试 windows 时,一切正常。那么...为什么 elm install
在 WSL 上不起作用?你有什么想法吗?
-------- 问题 --------
当我尝试 elm-test init
时,它不像下面那样工作
$ elm-test init
Here is my plan:
Add:
elm/random 1.0.0
elm-explorations/test 1.2.2
Would you like me to update your elm.json accordingly? [Y/n]:
-- PROBLEM DOWNLOADING PACKAGE -------------------------------------------------
I was trying to download the source code for elm/random 1.0.0, so I tried to
fetch:
https://github.com/elm/random/zipball/1.0.0/
But my HTTP library is giving me the following error message:
ConnectionTimeout
Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!
但我的浏览器 (Chrome) 运行良好,甚至在 WSL(我 运行 elm-test init
命令所在的环境)中也是如此。
$ curl https://github.com/elm/random/zipball/1.0.0/
https://codeload.github.com/elm/random/legacy.zip/1.0.0<body>You are being <a href="https://codeload.github.com/elm/random/legacy.zip/1.0.0">redirected</a>.</body></html>
然后我也再次尝试重定向 URL
$ curl https://codeload.github.com/elm/random/legacy.zip
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
我认为没有网络问题。我的电脑可以连上repo,估计会下载的很好
我最后只试了 elm install
,这也引发了同样的错误。 Elm 似乎无法连接到 repo,即使我的电脑可以。
$ elm install elm/random
Here is my plan:
Add:
elm/random 1.0.0
Would you like me to update your elm.json accordingly? [Y/n]:
-- PROBLEM DOWNLOADING PACKAGE -------------------------------------------------
I was trying to download the source code for elm/random 1.0.0, so I tried to
fetch:
https://github.com/elm/random/zipball/1.0.0/
But my HTTP library is giving me the following error message:
ConnectionTimeout
Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!
请帮帮我,我该怎么办?
最近有理由使用WSL进行elm开发。这不是很有趣,我很高兴回到 Mac!我发现 WSL 上的某些磁盘操作似乎进行得很慢,这可能会导致各种奇怪的问题。
我使用的是 Webstorm,它不能很好地处理 WSL,所以最后我在 C: 驱动器上(而不是在 /home/...
中)做了所有事情,这样 webstorm 就可以 运行 windows 版本的 elm-format,而我的节点开发环境是 运行 在 linux 层上。
这不是您问题的准确答案,只是说可以做到,但根据我的经验,这不是编写 Elm 代码的理想方式