Elixir and Erlang compiler version mismatch error

I keep getting this error when running mix firmware

** (Mix) Elixir was compiled by a different version of the Erlang/OTP compiler
than is being used now. This may not work.

Erlang compiler used for Elixir: 7.5.3
Current Erlang compiler:         8.0.2

Please use a version of Elixir that was compiled using the same major
version.

Elixir and erlang versions I use:

erlang 24.0
elixir 1.13.1-otp-24
1 Like

are you using asdf version-controller for installing erlang/elixir?

1 Like

are you using asdf version-controller for installing erlang/elixir?

yes

1 Like

tried with the latest versions…?? i.e.

=> asdf install erlang latest
=> asdf install elixir latest

and setting them up globally with:

=> asdf global erlang latest
=> asdf global elixir latest

1 Like

No, i am using the versions i mentioned in the post

erlang 24.0
elixir 1.13.1-otp-24

Which i installed using

asdf install elixir 1.13.1-otp-24
asdf install erlang 24.0
1 Like

The mismatch is due to whatever nerves_system_* you’re using which is based on the MIX_TARGET set. Erlang is compiled into the tooling for the target and so your host Erlang needs to match the system’s Erlang.

To see the compatibility and expected versions, find your target in the table here: Systems — nerves v1.9.1

FYI - If you’re using the latest version of an official system, it’s going to be expected OTP 25

2 Likes