erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
620 stars 136 forks source link

crash at startup #1436

Closed mbardet82 closed 5 months ago

mbardet82 commented 1 year ago

Erlang LS is crashing every time I open Visual Code. I am using otp 25

Could not start Language Server. Error: escript: exception error: undefined function erlang_ls:main/1 in function escript:run/2 (escript.erl, line 758) in call from escript:start/1 (escript.erl, line 277) in call from init:start_em/1 in call from init:do_boot/3 =ERROR REPORT==== 7-Jun-2023::20:38:53.808367 === beam/beam_load.c(1871): Error loading module erlang_ls: This BEAM file was compiled for a later version of the run-time system than 21. To fix this, please recompile this module with an 21 compiler. (Use of opcode 164; this emulator supports only up to 163.)

mcesaro commented 11 months ago

The erro description suggests that the module was compiled for an OTP version later than 21. You should try anc check that you are using an up to date Erlang LS, as this might be the cause for that crash.