doo

doo

ElixirLS in vscode: Failed to run 'elixir'

My problem

Env

OS: Window

# installed by asdf
elixir 1.15.2-otp-26
erlang 26.2.0

ElixirLS
0.20.0 (LTS)

When I run vscode and open the elixir file, a pop-up message like the below

Failed to run 'elixir' command. ElixirLS will probably fail to launch. Logged PATH to Development Console.

So, I checked view - output - elixirLS

[Error - 6:46:56 PM] Server process exited with code 1.
C:\Users\doo\.asdf\shims\erl.exe�� ������ ���� ���� Windows ������ ȣȯ���� �ʽ��ϴ�. ��ǻ���� �ý��� ������ Ȯ���ϰ� ����Ʈ���� �Խ��ڿ��� �����Ͻʽÿ�.
[Error - 6:46:56 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:46:56 PM] The ElixirLS - server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 6:46:56 PM] ElixirLS - client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:46:56 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 6:46:56 PM] Server process exited with code 1.

Nothing works except for the highlighting syntax

I tried to add PATH

echo $PATH

/c/Program Files/Elixir/bin:
/c/Program Files/Erlang OTP/bin:
/c/Users/doo/.asdf/shims:
/c/Users/doo/.asdf/bin

I’m using git bash in vscode *opened by git bash

Expected

intelliSense
Go to definition (custom function, built-in function

Please help me

Marked As Solved

doo

doo

I resolved

on Window
There is no .bat or .exe in .asdf/bin path

# .bashrc
export PATH=$PATH:$PATH:$HOME/.asdf/shims
export PATH=$PATH:$HOME/.asdf/bin

and I modified path
PATH=new_path:$PATH new path priority^
PATH=$PATH:new_path priority v

solution:

# .bashrc
export PATH=$HOME/.asdf/installs/elixir/1.15.2-otp-26/bin:$PATH
export PATH=$HOME/.asdf/installs/erlang/26.2.0/bin:$PATH

Also Liked

cmo

cmo

Can you run elixir? I didn’t think asdf worked on Windows.

Where Next?

Popular in Questions Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New

We're in Beta

About us Mission Statement