[error] beam\beam_load.c(86): Error loading module ‘Elixir.Code.Formatter’:

I installed elixir and earlant OTP 25. MIX and iex are defined but i get this error when trying to run a script

16:44:06.915 [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.

16:44:06.915 [error] Loading of c:/Program Files (x86)/Elixir/bin/…/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

1 Like

Elixir is precompiled for OTP 22 which is not fully compatible with OTP 25. You need to either use OTP 24 or compile Elixir from source.

1 Like

I appreciate the answer. I will install OTP 24.