Our team is developing a Phoenix project and this week a new member joined us. He tries to work in a Docker environment on the Ubuntu 20.04 box.
He pulled the source code from our GitHub repo and found that our app failed to start with this error message:
[error] beam/beam_load.c(1883): Error loading module telemetry_app:
This BEAM file was compiled for a later version of the run-time system than 22.
To fix this, please recompile this module with an 22 compiler.
(Use of opcode 169; this emulator supports only up to 168.)
[info] Application telemetry exited: exited in: :telemetry_app.start(:normal, [])
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function :telemetry_app.start/2 is undefined (module :telemetry_app is not available)
(telemetry 0.4.2) :telemetry_app.start(:normal, [])
(kernel 6.5.2.1) application_master.erl:277: :application_master.start_it_old/4
His output of mix hex.info
is here:
Hex: 0.20.5
Elixir: 1.10.3
OTP: 22.3.4.2
Built with: Elixir 1.10.0 and OTP 21.3
We, except him, continue to work as usual. How can we help him?
We found a possible culprit: ElixirLS, a plugin for Visual Studio Code.
Other than him, our team members use text editors other than VSCode.
When he uninstall this plugin from VSCode, everything went well.
I don't know what is the root cause of this problem, but I suppose that this plugin compiles the dependencies of our project outside the Docker environment so that version mismatch occurs.
He tried to start our app by docker-compose up -d app
.
The command specified in the command
section in the docker-compose.yml
is:
elixir --cookie xyz --sname xyz@app
--erl "-kernel inet_dist_listen_min 6000 inet_dist_listen_max 6100" -S mix phx.server