Failed to run 'elixir' command error in vs code

I solved it using:
sudo dnf install erlang-dialyzer
sudo dnf install erlang-edoc
asdf local elixir 1.13.3
asdf local erlang 24.3.4

Installing it globally worked for me on a M1 mac even with asdf installed via homebrew.

Same! this works for me! thank you so much!

I have Manjaro with asdf and zsh.

In my home I creatd a .profile file with this content:

echo 'export PATH="$PATH:/home/<user>/.asdf/shims:/home/<user>/.asdf/bin"' > ~/.profile

Just change <user> by your user name and it should work. If you already have this file I suggest you to do a backup.

2 Likes

I remove asdf from brew and install again with git and add asdf plugin to my .zshrc file

I prefer launching VSCode from the Mac OS toolbar, and it results in this error. Setting elixir and erlang global versions using asdf global ... doesn’t work for me.

VSCode developer console reports:

[Extension Host] /bin/sh: elixir: command not found | p @ console.ts:137
Failed to run 'elixir' command. ElixirLS will probably fail to launch. Logged PATH to Development Console. | c @ notificationsAlerts.ts:42
[Extension Host] Failed to run 'elixir' command. Current process's PATH: /usr/bin:/bin:/usr/sbin:/sbin

It does work, however, if I launch VSCode from the terminal using code .

Did you figure this out?