I have a fresh Windows 10 VM, which I am trying to use to develop some Elixir code.
However I cannot even fetch the dependencies as an error occurs:
> mix deps.get 11:47:57.487 [error] beam\beam_load.c(86): Error loading module 'Elixir.Code.Formatter': lambda already defined for label 749. To fix this, please recompile this module with an OTP 25 compiler. 11:47:57.487 [error] Loading of c:/Program Files (x86)/Elixir/lib/elixir/ebin/Elixir.Code.Formatter.beam failed: :badfile ** (UndefinedFunctionError) function Code.Formatter.locals_without_parens/0 is undefined (module Code.Formatter is not available) (elixir 1.13.4) Code.Formatter.locals_without_parens() (elixir 1.13.4) lib/code/normalizer.ex:22: Code.Normalizer.normalize/2 (elixir 1.13.4) lib/code.ex:1107: Code.quoted_to_algebra/2
The first thing I did was to install erlang OTP 25:
And then I went to Elixir’s page and installed Elixir 13.4 for Windows:
In my powershell, this is what I see when I check for both versions:
> iex.bat -v IEx 1.13.4 (compiled with Erlang/OTP 22) IEx 1.13.4 (compiled with Erlang/OTP 22)
> erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell "25"
So it is fair to assume both installations are correct.
I also know that v1.13.4 is compatible with OTP 25:
But clearly something is missing. I see the version I downloaded was compiled with OTP 22, but I find this very odd, as I used to have this exact same project working with OTP 24, on Windows.
> iex.bat -v IEx 1.13.4 (compiled with Erlang/OTP 22) 2> erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell "24" > mix deps.get Could not find Hex, which is needed to build dependency :credo Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] Y
How can I fix the error?