gmile

gmile

"Unchecked dependencies for environment" error

I tried setting up LS for the first time, but attempting to use any LS features silently failed. After looking at LS log collected by neovim, I got output below. It appears there’s some kind of issue coming from LS, but I am not sure how to act on this :thinking: Any idea why might be going on here?

I’m using Elixir 1.18.3, OTP 27.2, elixir-ls 0.27.2, and neovim 0.11.

[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Running /Users/eugene/.local/share/nvim/mason/packages/elixir-ls/launch.sh\n"
[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Preferred shell is fish, launching launch.fish\n"
[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Looking for asdf install\n"
[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "asdf not found\n"
[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Looking for mise executable\n"
[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "mise executable found at /opt/homebrew/bin/mise, activating\n"
[ERROR][2025-03-27 10:03:44] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "source: Error encountered while sourcing file ''set -gx MIX_ARCHIVES /Users/eugene/.local/share/mise/installs/elixir/1.18.3-otp-27/.mix/archives'':\nsource: No such file or directory\n"
[ERROR][2025-03-27 10:03:45] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Installing ElixirLS release v0.27.2\n"
[ERROR][2025-03-27 10:03:45] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Running in /Users/eugene/work/my-app\n"
[ERROR][2025-03-27 10:03:45] ...p/_transport.lua:36     "rpc"   "elixir-ls"     "stderr"        "Install complete\n"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "Unchecked dependencies for environment test:"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* decimal (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency decimal 1.9.0\n\n  > In deps/postgrex/mix.exs:\n    {:decimal, "~> 1.5 or ~> 2.0", [env: :prod, hex: "decimal", repo: "hexpm", optional: false]}\n\n  does not match the requirement specified\n\n  > In deps/ecto/mix.exs:\n    {:decimal, "~> 2.0", [env: :prod, hex: "decimal", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* mime (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency mime 1.6.0\n\n  > In deps/swoosh/mix.exs:\n    {:mime, "~> 1.1 or ~> 2.0", [env: :prod, hex: "mime", repo: "hexpm", optional: false]}\n\n  does not match the requirement specified\n\n  > In deps/req/mix.exs:\n    {:mime, "~> 2.0.6 or ~> 2.1", [env: :prod, hex: "mime", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* telemetry (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency telemetry 0.4.3\n\n  > In deps/swoosh/mix.exs:\n    {:telemetry, "~> 0.4.2 or ~> 1.0", [env: :prod, hex: "telemetry", repo: "hexpm", optional: false]}\n\n  does not match the requirement specified\n\n  > In deps/opentelemetry_telemetry/mix.exs:\n    {:telemetry, "~> 1.1", [env: :prod, hex: "telemetry", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* jason (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency jason 1.3.0\n\n  > In deps/swoosh/mix.exs:\n    {:jason, "~> 1.0", [env: :prod, hex: "jason", repo: "hexpm", optional: false]}\n\n  does not match the requirement specified\n\n  > In deps/mix_audit/mix.exs:\n    {:jason, "~> 1.4", [only: [:dev, :test], env: :prod, hex: "jason", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* db_connection (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency db_connection 2.1.1\n\n  > In deps/postgrex/mix.exs:\n    {:db_connection, "~> 2.1", [env: :prod, hex: "db_connection", repo: "hexpm", optional: false]}\n\n  does not match the requirement specified\n\n  > In deps/ecto_sql/mix.exs:\n    {:db_connection, "~> 2.4.1 or ~> 2.5", [env: :prod, hex: "db_connection", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* phoenix_pubsub (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency phoenix_pubsub 2.0.0\n\n  > In mix.exs:\n    {:phoenix_pubsub, "~> 2.0", [env: :prod, hex: "phoenix_pubsub", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/phoenix/mix.exs:\n    {:phoenix_pubsub, "~> 2.1", [env: :prod, hex: "phoenix_pubsub", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* ecto (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency ecto 3.2.2\n\n  > In mix.exs:\n    {:ecto, "~> 3.0", [env: :prod, hex: "ecto", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/scrivener_ecto/mix.exs:\n    {:ecto, "~> 3.12", [env: :prod, hex: "ecto", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* plug (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency plug 1.13.4\n\n  > In mix.exs:\n    {:plug, "~> 1.0", [env: :prod, hex: "plug", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/remote_ip/mix.exs:\n    {:plug, "~> 1.14", [env: :prod, hex: "plug", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* postgrex (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency postgrex 0.15.1\n\n  > In mix.exs:\n    {:postgrex, "~> 0.1", [env: :prod, hex: "postgrex", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/phoenix_ecto/mix.exs:\n    {:postgrex, "~> 0.16 or ~> 1.0", [env: :prod, hex: "postgrex", repo: "hexpm", optional: true]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* ecto_sql (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency ecto_sql 3.2.0\n\n  > In mix.exs:\n    {:ecto_sql, "~> 3.0", [env: :prod, hex: "ecto_sql", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/oban/mix.exs:\n    {:ecto_sql, "~> 3.10", [env: :prod, hex: "ecto_sql", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* elixir_make (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency elixir_make 0.6.0\n\n  > In deps/pdfium/mix.exs:\n    {:elixir_make, "~> 0.1", [env: :prod, hex: "elixir_make", repo: "hexpm", optional: false]}\n\n  does not match the requirement specified\n\n  > In deps/cc_precompiler/mix.exs:\n    {:elixir_make, "~> 0.7", [env: :prod, hex: "elixir_make", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* swoosh (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency swoosh 1.1.0\n\n  > In mix.exs:\n    {:swoosh, "~> 1.0", [env: :prod, hex: "swoosh", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/phoenix_swoosh/mix.exs:\n    {:swoosh, "~> 1.5", [env: :prod, hex: "swoosh", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     "* phoenix_ecto (Hex package)"
[WARN][2025-03-27 10:03:45] ...lsp/handlers.lua:564     '  the dependency phoenix_ecto 4.0.0\n\n  > In mix.exs:\n    {:phoenix_ecto, "~> 4.0", [env: :prod, hex: "phoenix_ecto", repo: "hexpm"]}\n\n  does not match the requirement specified\n\n  > In deps/error_tracker/mix.exs:\n    {:phoenix_ecto, "~> 4.6", [env: :prod, hex: "phoenix_ecto", repo: "hexpm", optional: false]}\n\n  Ensure they match or specify one of the above in your deps and set "override: true"'
[ERROR][2025-03-27 10:03:45] ...lsp/handlers.lua:562    "Process #PID<0.238.0> raised an exception\n** (Mix.Error) Can't continue due to errors on dependencies\n    (mix 1.18.3) lib/mix.ex:618: Mix.raise/2\n    (mix 1.18.3) lib/mix/tasks/deps.loadpaths.ex:100: Mix.Tasks.Deps.Loadpaths.deps_check/3\n    (mix 1.18.3) lib/mix/tasks/deps.loadpaths.ex:68: Mix.Tasks.Deps.Loadpaths.run/1\n    (mix 1.18.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5\n    (mix 1.18.3) lib/mix/tasks/loadpaths.ex:37: Mix.Tasks.Loadpaths.run/1\n    (mix 1.18.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5\n    (mix 1.18.3) lib/mix/tasks/compile.ex:129: Mix.Tasks.Compile.run/1\n    (mix 1.18.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5\n    (language_server 0.27.2) lib/language_server/build.ex:496: ElixirLS.LanguageServer.Build.run_mix_compile/1\n    (language_server 0.27.2) lib/language_server/build.ex:184: ElixirLS.LanguageServer.Build.handle_compile_phase/6\n    (stdlib 6.2.1) timer.erl:595: :timer.tc/2\n    (language_server 0.27.2) lib/language_server/build.ex:22: anonymous fn/3 in ElixirLS.LanguageServer.Build.build/3\n    (kernel 10.2.3) global.erl:699: :global.trans/4"

Marked As Solved

D4no0

D4no0

Seems like a strange issue, have you tried removing the _build and .elixir-ls folder from the project? Also can you confirm that the project can be compiled by elixir?

Also Liked

gmile

gmile

Looks like removing .elixir-ls folder did fixed it, thanks!

Where Next?

Popular in Questions Top

stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Exadra37
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
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement