freewebwithme
Failed to run 'elixir' command error in vs code
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ command. ElixirLS will probably fail to launch. Logged PATH to Development Console.
I think elixir command is in current path
which elixir
/home/user/.asdf/shims/elixir
and
echo $PATH
...........:/home/user/.asdf/shims:.....................
What is my problem?
Marked As Solved
NobbZ
You probably add asdf only to the PATH in your shells RC file.
To make it available to your GUI as well you neet to add it to your .Xprofile or whatever is read by your GUI.
Also Liked
jmnda
Setting erlang and elixir globally solve the issue for me as well
asdf global erlang <your_version>
asdf global elixir <your_version>
wdiechmann
@Facundo I can confirm that! Just <upgraded> my MacBook Air M1 to BigSur - and the next thing I noticed was that ElixirLS fails to start in VSCode
my .zshrc is good as is my asdf local elixir 1.12.0
I may have installed asdf with brew first - but my current installation is tucked away safely in $HOME/.asdf ![]()
Tried iex from CLI only to learn that elixir wasn’t the issue at all - erl was! (Note: I run all my workbench stuff in containers which is probably why I haven’t noticed)
Once I got my asdf global erlang 24.1 out of the way - all was good in VSCode on macOS BigSur land ![]()
NobbZ
How do you start VScode?
It might have a different view to your PATH than your shell, especially if you start it from a graphical environment rather from the terminal.
Please check the PATH logged into the console as explained by the error.
Please also check if the error persists when starting VScode from within a terminal that already is in the projects folder if you do not already open it that way. Depending on your operating system/flavor of it, you might need to run one of vscode . or code ..
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









