<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="256735" data-post-id="256735">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="herman-rogers" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/herman-rogers/120/27205_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  herman-rogers
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Installing it globally worked for me on a M1 mac even with asdf installed via homebrew.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="256735" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-256735" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="256735"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="261246" data-post-id="261246">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="enkr1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/enkr1/120/25195_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  enkr1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Same! this works for me! thank you so much!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261246" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-261246" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261246"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="279749" data-post-id="279749">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mrroot5" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mrroot5/120/25311_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mrroot5
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I have <strong>Manjaro</strong> with <strong>asdf</strong> and <strong>zsh</strong>.</p>
<p>In my home I creatd a <code>.profile</code> file with this content:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">echo 'export PATH="$PATH:/home/&lt;user&gt;/.asdf/shims:/home/&lt;user&gt;/.asdf/bin"' &gt; ~/.profile
</code></pre>
<p>Just change <code>&lt;user&gt;</code> by your user name and it should work. If you already have this file I suggest you to do a <strong>backup</strong>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="279749" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-279749" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="279749"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="300683" data-post-id="300683">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ronindev" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ronindev/120/36216_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ronindev
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I remove asdf from brew and install again with git and add asdf plugin to my .zshrc file</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="300683" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-300683" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="300683"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="316624" data-post-id="316624">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="egeersoz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egeersoz/120/15704_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  egeersoz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I prefer launching VSCode from the Mac OS toolbar, and it results in this error. Setting elixir and erlang global versions using <code>asdf global ...</code> doesn’t work for me.</p>
<p>VSCode developer console reports:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[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
</code></pre>
<p>It does work, however, if I launch VSCode from the terminal using <code>code .</code></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="316624" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-316624" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="316624"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="317321" data-post-id="317321">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="vecuenca" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/vecuenca/120/33625_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  vecuenca
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Did you figure this out?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="317321" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-317321" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="317321"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="329776" data-post-id="329776">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="acrolink" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/acrolink/120/8985_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  acrolink
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For me the solution was to create the file <code>$HOME/.tool-versions</code> with content like this <em>(matching the installed versions in system)</em>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">erlang 26.2.5
elixir 1.16.3-otp-26
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="329776" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-329776" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="329776"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="330855" data-post-id="330855">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lucavenir" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lucavenir/120/34202_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lucavenir
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>None of the above proposed fixes work for me.<br>
Let’s recap what I did.</p>
<p>As many, I installed <code>asdf</code> as described in the documentation, aka:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
</code></pre>
<p>Then, I installed erlang, and then elixir, as pointed out in the docs, as follows:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf install erlang 26.2.5
asdf global erlang 26.2.5
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf install elixir 1.16.3-otp-26
asdf global elixir 1.16.3-otp-26 
</code></pre>
<p>My <code>$HOME/.tool-versions</code> is the following:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">erlang 26.2.5
elixir 1.16.3-otp-26
</code></pre>
<p>At this point <code>iex</code> and <code>erl</code> work with no issue.<br>
But the vs code extensions don’t work yet.</p>
<p>Then I tried searching for <code>$HOME/.asdf/asdf.sh</code> but no file was found.<br>
Turns out <strong>the file <em>was</em> there</strong>, but I had no permissions on it and thus it wasn’t usable.</p>
<p>So, I temporarily <code>chmod 777 $HOME/.asdf/asdf.sh</code>, just to be sure, <strong>but again the vs code extensions don’t work yet</strong>.</p>
<p>This is the output I get, again:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Failed to run 'elixir' command. ElixirLS will probably fail to launch. Logged PATH to Development Console.
</code></pre>
<p>(the <code>PATH</code> is <em>not</em> logged on the dev console, by the way)</p>
<p>And also:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">OTP compiled without EEP48 documentation chunks
</code></pre>
<p>(which appears frequently)</p>
<p>Finally:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Unable to find formatter for [...]/file.ex: Mix project is not loaded
</code></pre>
<p>I’m not sure what to do at this point. I can’t seem to find reliable documentation nor troubleshooting anywhere, so I try here <img src="https://forum.elixirforum.com/images/emoji/apple/cry.png?v=15" title=":cry:" class="emoji" alt=":cry:" loading="lazy" width="20" height="20"></p>
<p>Elixir is a blast but I’m honestly surprised it is this hard to <em>actually</em> get “up and running” (for reals tho, not just tooling around).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="330855" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-330855" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="330855"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="331768" data-post-id="331768">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="taylordowns2000" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/taylordowns2000/120/6654_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  taylordowns2000
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/lucavenir" rel="nofollow">@lucavenir</a> , sorry to not be able to help but I think there’s an <em>outside chance</em> <img src="https://forum.elixirforum.com/images/emoji/apple/person_shrugging.png?v=15" title=":person_shrugging:" class="emoji" alt=":person_shrugging:" loading="lazy" width="20" height="20"> that this is some sort of regression or compatibility issue with ElixirLS.</p>
<p>I’ve been happily using Elixir in vsCode since circa 2015 and it stopped working maybe a week ago. I’m at the exact same place you are right now—your post above—but only part-time devving and don’t have the bandwidth to debug further at the moment.</p>
<p>On a Mac M1, for what it’s worth:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">erlang 26.2.5
elixir 1.16.2-otp-26
</code></pre>
<p>Apologies for not being more helpful the moment. Just wanted you to know you’re not the only one. Anyone here have further ideas?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="331768" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-331768" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="331768"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="331825" data-post-id="331825">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lucavenir" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lucavenir/120/34202_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lucavenir
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello there again,</p>
<p><em>Thank you</em> for your kind response. I just want to add my further experience; I didn’t give up, but even when switching OS isn’t solving the issue… that’s a good sign to bail.</p>
<p>Here’s what I tried:</p>
<ul>
<li>re-installed elixir, erlang and the extensions from scratch, <strong>nothing</strong></li>
<li>re-installed vscode from scratch along with elixir/erlang/extensions/etc., <strong>nothing</strong></li>
<li>gave up on using Ubuntu 22.04 to write elixir code, formatted and erased everything, re-installed linux with FedoraOS distro, reinstalled erlang/elixir/vscode/extensions… <strong>still nothing</strong></li>
</ul>
<p>Let me say it again - this ecosystem really deserves a unified DX when it comes to tooling. Don’t get me wrong, I love Elixir and I love working with it. And Phoenix, too.</p>
<p>Nonetheless, and <em>luckily</em>, <a href="https://github.com/lexical-lsp/lexical" rel="noopener nofollow ugc">lexical is a thing</a>. I’m sticking to this solution until I figure out why/how/what makes tooling hard to work with.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="331825" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/failed-to-run-elixir-command-error-in-vs-code/31047/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-331825" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="331825"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/31047/load_more?page=4">Load more posts (9 remaining)</a>
</div></template></turbo-stream>