emmettng
ElixirLS server initialization failed
I just started trying Elixir today and configuring the dev environment in vscode and got this error.
Here is some basic information below :
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [jit]
Elixir 1.12.2 (compiled with Erlang/OTP 24)
I created a project following this tutorial https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html
After installing this vscode plugin " ElixirLS: Elixir support and debuggerv0.14.5"
I got this error message.
could not compile dependency :sourceror, “mix compile” failed. You can recompile this dependency with “mix deps.compile sourceror”, update it with “mix deps.update sourceror” or clean it with “mix deps.clean sourceror”
[Error - 21:37:22] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 21:37:22] Connection to server got closed. Server will restart.
true
[Error - 21:37:22] ElixirLS - kv client: couldn’t create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
I googled similar issues and no solution fixed my problem interestingly, there is no “.elixir_ls/” in the project root.
I think this must be a really trivial mistake and it took me 3 hours
Most Liked
cloudytoday
I think I’ve added the sourceror successfully, however, I still got the error message
Yes you did, however there’s quite a number of warnings as well as you can see. From the sourceror README it reads that they DO support your version of Elixir and OTP, but as a first poke you could try installing fresher versions of each via ASDF package manager (very convenient and supports a lot of tools other than Elixir/OTP). After removing your old installations of Elixir and Erlang and installing ASDF following the instructions on their website:
asdf plugin-add elixir
asdf plugin-add erlang
asdf install erlang 25.3
asdf install elixir 1.14.4-otp-25
asdf global erlang 25.3
asdf global elixir 1.14.4-otp-25








