vkryukov
Problems compiling elixir-ls
Hi, I have some challenges compiling elixir-ls. I’m using Erlang 28.1.1 and Elixir 1.19.2-otp-28 installed with mise on Omarchy 3.1.5. using the latest nvim/lazyvim, I can see the following error generated in the logs in ~/.local/state/nvim/lsp.log.
[ERROR][2025-11-04 11:56:04] ...p/_transport.lua:36 "rpc" "elixir-ls" "stderr" "==> elixir_ls_utils\nCompiling 10 files (.ex)\n"
[ERROR][2025-11-04 11:56:04] ...p/_transport.lua:36 "rpc" "elixir-ls" "stderr" " error: ElixirSense.Core.Metadata.__struct__/1 is undefined, cannot expand struct ElixirSense.Core.Metadata. Make sure the struct name is correct. If the struct name exists and is correct but it still cannot be found, you likely have cyclic module usage in your code\n │\n 7 │ def get_field_types(%Metadata{} = metadata, mod, include_private) when is_atom(mod) do\n │ ^\n │\n └─ lib/field.ex:7:23: ElixirLS.Utils.Field.get_field_types/3\n\n"
[ERROR][2025-11-04 11:56:04] ...p/_transport.lua:36 "rpc" "elixir-ls" "stderr" "\n== Compilation error in file lib/field.ex ==\n** (CompileError) lib/field.ex: cannot compile module ElixirLS.Utils.Field (errors have been logged)\n (stdlib 7.1) lists.erl:2466: :lists.foldl/3\n"
[ERROR][2025-11-04 11:56:04] ...p/_transport.lua:36 "rpc" "elixir-ls" "stderr" '==> elixir_ls\ncould not compile dependency :elixir_ls, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile elixir_ls --force", update it with "mix deps.update elixir_ls" or clean it with "mix deps.clean elixir_ls"\n'
Any idea what might be going on here?
Also, related question: is elixir-ls still supported, and is it better to switch to expert from now on? What are the pros and cons of using expert vs elixir-ls nowadays?
Marked As Solved
vkryukov
Nevermind, I was able to resolve this problem by uninstalling and installing the elixir-ls via Mason from inside nvim:
:MasonUninstall elixir-ls
:MasonInstall elixir-ls
1
Popular in Questions
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Hello everyone,
I try to use an Javascript Event Handler in my root.html.leex file.
Therefore I created a function in the app.js file: ...
New
Other popular topics
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









