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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>After a brew update, i’ve seen this same error and the output seems ok:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[Info  - 20:30:12] Started ElixirLS v0.23.0
[Info  - 20:30:12] Running in /Users/57block/work/messages
[Info  - 20:30:12] ElixirLS built with elixir "1.15.6" on OTP "25"
[Info  - 20:30:12] Running on elixir "1.15.6 (compiled with Erlang/OTP 24)" on OTP "25"
[Info  - 20:30:12] Protocols are not consolidated
[Info  - 20:30:12] Elixir sources not found (checking in /home/runner/work/elixir/elixir). Code navigation to Elixir modules disabled.
</code></pre>
<p>It successfully find the asdf and figure out the right version. But why the error still shows:</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/0/3/03ce23487cc6f986f131c0575054a3d6de84cf74.jpeg" data-download-href="https://forum.elixirforum.com/uploads/default/03ce23487cc6f986f131c0575054a3d6de84cf74" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/optimized/3X/0/3/03ce23487cc6f986f131c0575054a3d6de84cf74_2_690x256.jpeg" alt="image" data-base62-sha1="xF504wNlCQHhzW2Jl5QRlOeDmQ" width="690" height="256" srcset="https://forum.elixirforum.com/uploads/default/optimized/3X/0/3/03ce23487cc6f986f131c0575054a3d6de84cf74_2_690x256.jpeg, https://forum.elixirforum.com/uploads/default/optimized/3X/0/3/03ce23487cc6f986f131c0575054a3d6de84cf74_2_1035x384.jpeg 1.5x, https://forum.elixirforum.com/uploads/default/original/3X/0/3/03ce23487cc6f986f131c0575054a3d6de84cf74.jpeg 2x" data-dominant-color="2E2A29"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1200×446 78.9 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>And as some other people said, running from the terminal <code>code .</code>  eliminate this error. Too wierd!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="337147" 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/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-337147" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="337147"
                     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 #31"></div>
  </section>
</div>
    <div class="postbit" id="337202" data-post-id="337202">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi, all, i accidentally found another trick to fix it when looking for another similar issue:</p>
<p><a href="https://github.com/Shopify/ruby-lsp/issues/1586#issuecomment-1991931424" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/Shopify/ruby-lsp/issues/1586#issuecomment-1991931424</a></p>
<p>FYI</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="337202" 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/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-337202" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="337202"
                     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 #32"></div>
  </section>
</div>
    <div class="postbit" id="337290" data-post-id="337290">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lukaszsamson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lukaszsamson/120/7671_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lukaszsamson
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ElixirLS Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That’s a known issue <a href="https://github.com/elixir-lsp/vscode-elixir-ls/issues/406" class="inline-onebox" rel="noopener nofollow ugc">elixir command check is invalid · Issue #406 · elixir-lsp/vscode-elixir-ls · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="337290" 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/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-337290" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="337290"
                     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 #33"></div>
  </section>
</div>
    <div class="postbit" id="351835" data-post-id="351835">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was also hit my this and it was fixed when I asked <a href="https://mise.jdx.dev/" rel="noopener nofollow ugc">mise</a> to use latest elixir globally:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ mise use -g elixir@(mise latest elixir)
</code></pre>
<p>Then I restarted VS Code and my errors went away and ElixirLS was able to find <code>elixir</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="351835" 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/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-351835" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="351835"
                     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 #34"></div>
  </section>
</div>
    <div class="postbit" id="352452" data-post-id="352452">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I solved this issue without the use of path editing. It had to do with a global elixir version not being set with <strong>asdf</strong> or the global elixir version not being compatible with the local projects elixir version.</p>
<p>The output for this issue was not actually in the Terminal → Output → Elixir LS logs. It was in Terminal → Output → Window. It was telling me that Codium was unable to run “elixir” because an elixir version was not found in ~/.tool-versions</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="352452" 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/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-352452" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="352452"
                     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 #35"></div>
  </section>
</div>
    <div class="postbit" id="367620" data-post-id="367620">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I bumped into this one “Failed to run ‘elixir’ command. ElixirLS will probably fail to launch. Logged PATH to Development Console” on VSCode (Code, or Visual Studio) on MacOS and what happened is that I switched to fish from zshell, which I left  dangling my bad, and ElixirLS in Code is tied to zshell and asdf wasn’t properly setup so it could not start despite that it was working fine in fish.</p>
<p>In my case I just had to add this asdf configuration to .zshrc</p>
<p>tail -2 ~/.zshrc<br>
. /opt/homebrew/opt/asdf/libexec/asdf.sh<br>
. /opt/homebrew/opt/asdf/etc/bash_completion.d/asdf</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367620" 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/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-367620" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367620"
                     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 #36"></div>
  </section>
</div>
    <div class="postbit" id="371170" data-post-id="371170">
  <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>Just do not waste your time trying to make this work. It won’t.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371170" 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/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-371170" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371170"
                     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 #37"></div>
  </section>
</div>
    <div class="postbit" id="371883" data-post-id="371883">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tpdly" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tpdly
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had the same problem <code>launch.sh line 140: elixir: command not found</code>. I tried change <code>launch.sh</code> manually to use my asdf shim, then <code>erl</code> wasn’t found.</p>
<p>The problem is about what environment <code>launch.sh</code> is running in-- I was running it via emacs eglot, having started emacs as a daemon via systemd.</p>
<p>If I start the emacs daemon manually everything works.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371883" 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/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-371883" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371883"
                     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 #38"></div>
  </section>
</div>
    <div class="postbit" id="371897" data-post-id="371897">
  <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>Actually, my latest observation is that it does work when a precompiled Elixir - OTP build is installed via asdf. See the documentation at asdf-elixir:</p>
<p>.. for example, to install Elixir 1.5.0 and take advantage of the new features from OTP-20 you might install version <code>1.5.0-otp-20</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="371897" 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/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-371897" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371897"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>