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
can someone please explain to me how Enum.reduce works with maps
New
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it.
I’m very interested in Elixir,...
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 there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
Student & New to elixir. Nice language.
I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
The Elixir Typespec docs show the following syntax for keyword lists in typespecs:
# ...
| [key: type] # keyword lis...
New
Sometimes I want to check if the input into a function is not a blank string.
My first approach:
defmodule Example do
def do_stuff(s...
New
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work.
Or rather, not char, but a substr...
New
Other popular topics
Hello!
tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability.
After spen...
New
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
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
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Hello guys,
I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New







