Trouble starting up language server - elixir-ls

I have recently setup Erlang / Elixir on Ubuntu 20.04.

I installed Erlang/OTP 23 and Elixir 1.10.4 via the apt package manager. I am adding Elixir to Neovim using coc.nvim.

I have followed the instructions for building Elixir Language Server (ElixirLS) that is on their Github page. It compiles ok but when I go to run the server I get the following error:

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"\u001B[22m\n15:46:08.023 [info]  Application hipe exited: :stopped\n\u001B[0m","type":4}}

Content-Length: 419

{"jsonrpc":"2.0","method":"window/logMessage","params":{"message":"** (MatchError) no match of right hand side value: {:error, {:wx, {'no such file or directory', 'wx.app'}}}\n    (language_server 0.5.0) lib/language_server/cli.ex:9: ElixirLS.LanguageServer.CLI.main/0\n    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6\n    (elixir 1.10.4) lib/code.ex:341: Code.eval_string_with_error_handling/3","type":2}}

It looks like it has something to do with wx, would that mean wxWidgets? I am unsure and unable to find anything on the web via searching that might help.

Any help would be appreciated!

Thanks

Hello and welcome…

If You look at asdf erlang, You might see some dependencies needed for Ubuntu 20.04 LTS.

apt-get -y install build-essential autoconf m4 libncurses5-dev 
libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev 
libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev 
openjdk-11-jdk

wx should be optional, but not for running observer.

3 Likes

Thank you for pointing me at asdf. I have reinstalled Erlang and Elixir using that VM and it is up and running! I didn’t know about asdf so thanks also for introducing me to that.

Thanks

2 Likes