2

One of my extensions (ElixirLS) crashes because it is unable to find the elixir executable in the VSCode PATH. However, VSCode's PATH is correct if I launch it from my terminal. How do I make sure that the PATH is correct when I launch it from my desktop environment instead of from my terminal?

Pistrie
  • 23
  • 4

1 Answers1

0

First, try the troubleshooting steps as noted for elixir-ls. (Shutdown VS Code, then remove . elixir_ls directory in your project, start-up VS Code and see if that fixes it)

If that doesn't fix it, run which elixir and elixir --version in your terminal. You should get something like the following for your installation of elixir:

MBP13-2017:Projects guy$ which elixir
/Users/guy/.kiex/elixirs/elixir-1.12.1/bin/elixir
MBP13-2017:Projects guy$ elixir --version
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.12.1 (compiled with Erlang/OTP 23)

Next, open a new terminal in VS Code and run the same commands. If you don't get the same output as you did in the terminal, there is probably something you're missing in your .bash_profile, .zprofile, or the .dot files for whatever shell you're using that adds elixir to the $PATH when you start a new terminal session, which is not being loaded when VS Code loads a new terminal session.

DogEatDog
  • 2,899
  • 2
  • 36
  • 65