Cannot install any elm packages

Hi all, I just upgraded Elm to 19 on a Ubuntu Linux box and try to start a project through elm init, however, I got the following error message:

The following HTTP request failed:

<https://package.elm-lang.org/all-packages>

Here is the error message I was able to extract:

HttpExceptionRequest Request { host = "package.elm-lang.org" port = 443
secure = True requestHeaders =
[("User-Agent","elm/0.19.0"),("Accept-Encoding","gzip")] path =
"/all-packages" queryString = "" method = "GET" proxy = Nothing rawBody =
False redirectCount = 10 responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1 } (ConnectionFailure Network.Socket.getAddrInfo
(called with preferred socket type/protocol: AddrInfo {addrFlags =
[AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream,
addrProtocol = 6, addrAddress = <assumed to be undefined>, addrCanonName =
<assumed to be undefined>}, host name: Just "package.elm-lang.org", service
name: Just "443"): does not exist (Try again))

This error also happens if I try to build existing Elm projects. I tried to uninstall and reinstall Elm from different sources (I installed through npm first time and downloaded the binary for the second time), the problem still preserve.

At the end of the error message it says the URL doesn’t exist. So this looks like a networking issue. Maybe test if you can reach the same URL from the same box using curl or wget or a browser. Maybe it’s behind a firewall or you need to set HTTPS_PROXY in the environment?

https://package.elm-lang.org is not set up for ipv6 (I just tested). So you need to change the protocol to v4.

Solved:

  1. ping package.elm-lang.org
  2. Adds the ip into /etc/hosts

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.