elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.54k stars 663 forks source link

elm: Network.Socket.bind: resource busy (Address in use) #2273

Open aminnairi opened 2 years ago

aminnairi commented 2 years ago

Quick Summary:

The error message for when the command reactor from the elm compiler is used could be more human friendly and newcomers' friendly (writers, non-devs, ...).

SSCCE

elm reactor
Go to http://localhost:8000 to see your project dashboard.
elm: Network.Socket.bind: resource busy (Address in use)

Additional Details

The error message, while sufficient for devs, might be intimidating since it refers to socket which can be confused with websockets and lead the user to the wrong guess (am I using a websocket? What is a websocket? How can I disable this in my operating system?).

The error could maybe look like

elm reactor
Oops! Looks like another application is using the port 8000.  A port is a way
to open communication between two interfaces, a server (elm reactor) and a
client (your browser).  But I can't open the port 8000 since there is already
another application (another server) listening for requests for this port!  Try
to search & stop the application that is responsible for listening to this port?
Or you can also use a different port by using this syntax.

elm reactor --port 8001

Try using

elm reactor --help

For more information.

Of course the error message could be shorter but it's nice to have this educational error messages sometimes.

github-actions[bot] commented 2 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.