nathankg

nathankg

Good day, folks!

This is my first day using Elixir (1.14.4 (compiled with Erlang/OTP 25)) & the ElixirLS: Elixir support and debugger VS Code extension (v0.15.3).

When I try running the extension on VS Code (for my code “checkmate_api”), I receive an error about
the module ElixirLS.Shell.Quiet.

Running /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
Sourcing ASDF
** (ArgumentError) could not call Module.put_attribute/3 because the module ElixirLS.Shell.Quiet is already compiled
    (elixir 1.14.4) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.4) lib/module.ex:2201: Module.__put_attribute__/5
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:60: (module)
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:59: (file)
[Error - 12:42:28 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 12:42:28 PM] Connection to server got closed. Server will restart.
true
[Error - 12:42:28 PM] ElixirLS - checkmate_api client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Running /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
Sourcing ASDF
** (ArgumentError) could not call Module.put_attribute/3 because the module ElixirLS.Shell.Quiet is already compiled
    (elixir 1.14.4) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.4) lib/module.ex:2201: Module.__put_attribute__/5
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:60: (module)
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:59: (file)
[Error - 12:42:30 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 12:42:30 PM] Connection to server got closed. Server will restart.
true
[Error - 12:42:30 PM] ElixirLS - checkmate_api client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Running /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
Sourcing ASDF
** (ArgumentError) could not call Module.put_attribute/3 because the module ElixirLS.Shell.Quiet is already compiled
    (elixir 1.14.4) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.4) lib/module.ex:2201: Module.__put_attribute__/5
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:60: (module)
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:59: (file)
[Error - 12:42:32 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 12:42:32 PM] Connection to server got closed. Server will restart.
true
[Error - 12:42:32 PM] ElixirLS - checkmate_api client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:42:32 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Running /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
Sourcing ASDF
** (ArgumentError) could not call Module.put_attribute/3 because the module ElixirLS.Shell.Quiet is already compiled
    (elixir 1.14.4) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.4) lib/module.ex:2201: Module.__put_attribute__/5
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:60: (module)
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:59: (file)
[Error - 12:42:33 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 12:42:33 PM] Connection to server got closed. Server will restart.
true
[Error - 12:42:33 PM] ElixirLS - checkmate_api client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:42:33 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Running /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
Sourcing ASDF
** (ArgumentError) could not call Module.put_attribute/3 because the module ElixirLS.Shell.Quiet is already compiled
    (elixir 1.14.4) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.4) lib/module.ex:2201: Module.__put_attribute__/5
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:60: (module)
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:59: (file)
[Error - 12:42:36 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:42:36 PM] The ElixirLS - checkmate_api server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 12:42:36 PM] ElixirLS - checkmate_api client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 12:42:36 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097

I’ve been racking my brain trying to understand what’s happening here and this has led to many installs, uninstalls, and reinstalls using homebrew & asdf. When installing elixir via asdf, I’ve noticed that in my root directory of my “users/nathangupta”, we create a hidden directory with an elixir executable:

/Users/nathangupta/.asdf/shims/elixir

and then the versions are added in the “installs” directory.

I’ve also noticed that I have elixir in this directory /usr/local/Cellar/elixir/1.15.2 likely because I did brew install elixir.

What I don’t understand is why we look for ASDF twice if it’s found the first time, and I’m not sure what’s happening the second time around.

For additional context, this is my ./zshrc file.

if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init -)"; fi

export PATH="/Library/PostgreSQL/14/bin:$PATH"
export PATH="/usr/local/opt/docker/bin:$PATH"
export PATH="/usr/local/etc/bash_completion.d/docker:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/opt/erlang/bin:$PATH"
export PATH="/usr/local/Cellar/:$PATH"

export LDFLAGS="-L$(brew --prefix openssl)/lib"
export CPPFLAGS="-I$(brew --prefix openssl)/include"

export PATH="/usr/local/opt/erlang@25/bin:$PATH"


export PATH="$PATH:/Users/nathangupta/.local/bin"

. /usr/local/opt/asdf/libexec/asdf.sh

Showing Posts 1 to 10

hubertlepicki

hubertlepicki

I don’t use VSCode, but other editor that integrates with Elixir LS and I think I saw an issue where it didn’t work if I started my editor from a different path than my project path.

So what I do is that I open a terminal, then navigate to the project directory. This picks up the .tool-version file and sets all the paths and env variables up and from within that directory I launch my code editor.

Did you try doing exactly that?

lukaszsamson

lukaszsamson

ElixirLS Core Team

Strange issue, I opened Launch script can fail · Issue #944 · elixir-lsp/elixir-ls · GitHub
It looks like ElixirLS.Shell.Quiet is already compiled in your shell. Have you installed elixir-ls from brew?
You should be able to execute /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/language_server.sh from your project directory. You can also try directly running the launch script

export ELS_MODE=language_server
export MIX_ENV=prod
elixir --erl "-kernel standard_io_encoding latin1" "/Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.exs"

maybe it will help to spot what’s wrong

What I don’t understand is why we look for ASDF twice

The launch script starts as a POSIX shell script and then it reloads itself as bash or zsh script. ASDF does not support POSIX shell

nathankg

nathankg OP

Really appreciate the suggestion. I gave this a shot & still no luck. I’m seeing the same error.

Thank you for this suggestion too! And I appreciate you opening the issue in the extension repo. So I didn’t install elixir-ls directly; instead I installed elixir using homebrew & the elixir-ls extension on VS Code. However, I’ve since tried installing elixir-ls via brew, and I’m seeing the same issue.

What I’m trying to figure out is where I might have an extra path or an extra install that’s leading to an already compiled ElixirLS.Shell.Quiet

nathankg

nathankg OP

Another thought–why is this relaunching in a bash shell when I use zsh on my local Terminal & I see zsh in the VS Code terminal?

lukaszsamson

lukaszsamson

ElixirLS Core Team

Probably the better way would be to check '$SHELL`

nathankg

nathankg OP

Oh so if I do echo $SHELL in VS Code and my local Terminal, I see ‘/bin/zsh’.
But then when I run the launch command for Elixir LS or go into VS Code, I see

“ASDF found, relaunching in bash shell”

nathangupta@Nathans-MacBook-Pro checkmate_api % /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/language_server.sh
Running /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /usr/local/opt/asdf/libexec/asdf.sh
Sourcing ASDF
** (ArgumentError) could not call Module.put_attribute/3 because the module ElixirLS.Shell.Quiet is already compiled
    (elixir 1.14.4) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.4) lib/module.ex:2201: Module.__put_attribute__/5
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:60: (module)
    /Users/nathangupta/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/installer.exs:59: (file)

lukaszsamson

lukaszsamson

ElixirLS Core Team

Unfortunately I’m not able to reproduce your issue. Please uninstall brew installed elixir-ls as it’s some unofficial package. Clean up your extension directory as well. Also in my experience ASDF, elixir and erlang installed via brew equals problems

theodore

theodore

I had a similar error to you and fixed it.
In my case, I installed elixir via asdf a while back and eventually uninstalled it (I just use brew installed elixir now).

But there were leftover configuration files that were being picked up by ElixirLS. I needed to do the following:

$ rm -rf ~/.asdf/
$ rm -rf ~/.tool-versions
baltazaro

baltazaro

I also use asdf and I had a similar problem. I solved it by adding erlang to my ~/.tool-versions

elixir 1.15.7
erlang 26.0
sebasortiz

sebasortiz

This also worked for me. In Cursor

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New
dillonoconnor
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews