ElixirLS – (Mix.Error) Can't continue due to errors on dependencies

I am getting this error:

an exception was raised:
    ** (Mix.Error) Can't continue due to errors on dependencies
        (mix 1.18.3) lib/mix.ex:618: Mix.raise/2
        (mix 1.18.3) lib/mix/tasks/deps.loadpaths.ex:100: Mix.Tasks.Deps.Loadpaths.deps_check/3
        (mix 1.18.3) lib/mix/tasks/deps.loadpaths.ex:68: Mix.Tasks.Deps.Loadpaths.run/1
        (mix 1.18.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
        (mix 1.18.3) lib/mix/tasks/loadpaths.ex:37: Mix.Tasks.Loadpaths.run/1
        (mix 1.18.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
        (mix 1.18.3) lib/mix/tasks/compile.ex:129: Mix.Tasks.Compile.run/1
        (mix 1.18.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
        (language_server 0.27.1) lib/language_server/build.ex:496: ElixirLS.LanguageServer.Build.run_mix_compile/1
        (language_server 0.27.1) lib/language_server/build.ex:184: ElixirLS.LanguageServer.Build.handle_compile_phase/6
        (stdlib 6.2) timer.erl:595: :timer.tc/2
        (language_server 0.27.1) lib/language_server/build.ex:22: anonymous fn/3 in ElixirLS.LanguageServer.Build.build/3
        (kernel 10.2.2) global.erl:699: :global.trans/4

Any clues what might be causing the problems? Or how to find the culprit?

For more context - this happens inside “Codium”, where the LS is involved.

I did all I could think of. mix deps.unlock --all, mix deps.update --all, mix deps.clean --all followed by the regular mix deps.get

In general when I see this it means I need to mix deps.get in the project.

1 Like

I am sorry I should have mentioned that I did all the deps related “tricks” I could think of:

mix deps.unlock --all , mix deps.update --all , mix deps.clean --all followed by the regular mix deps.get

Normally I delete /deps and /_elixir_ls folders and it fixes it.

1 Like

I already tried deleting deps and _build earlier, and it didn’t help. But thanks to your response I found the hidden .elixir_ls directory and removed it - > bingo! That cured the problem. Thanks a lot.

Lol, at this point I just delete that directory proactively every time I update anything.

2 Likes

Same btw, and I had no ElixirLS troubles in years by doing so. :smiley:

2 Likes