travisf

travisf

I used to manage all of my Elixir stuff with ASDF but I’ve been consulting on a Ruby project and mise seemed to work better there so I made the switch. However, this seems to have broken my Elixir LSPs. I don’t know too much about what’s going on under the hood with Hex so forgive my ignorance here.

If I run mix hex.info I get this:

Hex:    2.4.1
Elixir: 1.19.5
OTP:    28.3

Built with: Elixir 1.19.5 and OTP 28.4.1

However, if I then run elixir-ls I get this:

Running /Users/travis/.local/share/mise/installs/elixir-ls/0.30.0/launch.sh
Preferred shell is zsh, relaunching
Looking for asdf install
Legacy asdf not found at /Users/travis/.asdf/asdf.sh
unknown command: elixir. Perhaps you have to reshim?
Running setup script /Users/travis/.config/elixir_ls/setup.sh
Installing ElixirLS release v0.30.0
Running in /Users/travis/Documents/my_project
* Updating elixir_ls (https://github.com/elixir-lsp/elixir-ls.git - v0.30.0)
==> language_server
Could not find Hex, which is needed to build dependency :stream_data
Shall I install Hex? (if running non-interactively, use "mix local.hex --force")
* creating /Users/travis/.local/share/mise/installs/elixir/1.19.5-otp-28/.mix/archives/hex-2.4.1
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
Mix.install failed with ** (UndefinedFunctionError) function Hex.start/0 is undefined (module Hex is not available)
    Hex.start()
    (mix 1.13.4) lib/mix/hex.ex:59: Mix.Hex.start/0
    (mix 1.13.4) lib/mix/dep/loader.ex:203: Mix.Dep.Loader.with_scm_and_app/4
    (mix 1.13.4) lib/mix/dep/loader.ex:156: Mix.Dep.Loader.to_dep/3
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.13.4) lib/mix/dep/loader.ex:373: Mix.Dep.Loader.mix_children/2
    (mix 1.13.4) lib/mix/dep/loader.ex:331: anonymous fn/4 in Mix.Dep.Loader.mix_dep/2

Retrying Mix.install with force: true

I’ve run mix archive uninstall hex.ez and reinstalled hex (this was before getting the above yet again).

Something that may or may not be related is simply running mix hex I get this warning:

07:00:27.523 [error] beam/beam_load.c(219): Error loading module 'Elixir.Hex':
  This BEAM file was compiled for an old version of the runtime system.
  To fix this, please re-compile this module with Erlang/OTP 25 or later.



Mix requires the Hex package manager to fetch dependencies
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn]

There have been a few, project specific, occasions where something like elixir-ls would start working in my terminal, however it would crash in in Zed or Sublime right around the Could not start Hex. Try fetching a new version....

Showing Posts 4 to 1

travisf

travisf OP

Generally I do, I was just playing around with it locally in my terminal to see if it would run. If I mise unuse elixir-ls and let Zed handle it the error message is the same from the Zed lsp logs. The logging from Sublime isn’t quite as detailed but I suspect the same error is at the heart of those issues as well.

dimitarvp

dimitarvp

I am a bit perplexed on why would you need elixir-ls managed by asdf or mise at all? Why not let your code editor manage it?

travisf

travisf OP

Thanks, you are correct I did still have some ASDF artifacts lying around which I’ve removed but the error remains, effectively the same:

Running /Users/travis/.local/share/mise/installs/elixir-ls/0.30.0/launch.sh
Preferred shell is zsh, relaunching
Looking for asdf install
asdf not found
Looking for mise executable
mise executable found at /Users/travis/.local/bin/mise, activating
Running setup script /Users/travis/.config/elixir_ls/setup.sh
Installing ElixirLS release v0.30.0
Running in /Users/travis/Documents/postbox
* Updating elixir_ls (https://github.com/elixir-lsp/elixir-ls.git - v0.30.0)
==> language_server
Could not find Hex, which is needed to build dependency :stream_data
Shall I install Hex? (if running non-interactively, use "mix local.hex --force")
* creating /Users/travis/.local/share/mise/installs/elixir/1.19.5-otp-28/.mix/archives/hex-2.4.1
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
Mix.install failed with ** (UndefinedFunctionError) function Hex.start/0 is undefined (module Hex is not available)
    Hex.start()
    (mix 1.13.4) lib/mix/hex.ex:59: Mix.Hex.start/0
    (mix 1.13.4) lib/mix/dep/loader.ex:203: Mix.Dep.Loader.with_scm_and_app/4
    (mix 1.13.4) lib/mix/dep/loader.ex:156: Mix.Dep.Loader.to_dep/3
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.13.4) lib/mix/dep/loader.ex:373: Mix.Dep.Loader.mix_children/2
    (mix 1.13.4) lib/mix/dep/loader.ex:331: anonymous fn/4 in Mix.Dep.Loader.mix_dep/2
urcadox

urcadox

Looks like you still have asdf installed. You should remove it entirely for that launch script to use mise.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews