I'd like to use the Erlang LS plugin in VSCode, but I'm encountering an issue.

Every time I open it, I receive the following error message:

“Could not start Language Server. Error: =ERROR REPORT==== 28-Sep-2023::00:49:26 === Loading of c:/Users/21768/.vscode/extensions/erlang-ls.erlang-ls-0.0.40/erlang_ls/_build/default/bin/erlang_ls/els_lsp/ebin/erlang_ls.beam failed: badfile =ERROR REPORT==== 28-Sep-2023::00:49:26 === beam/beam_load.c(1287): Error loading module erlang_ls: mandatory chunk of type ‘Atom’ not found escript: exception error: undefined function erlang_ls:main/1 in function escript:run/2 (escript.erl, line 760) in call from escript:start/1 (escript.erl, line 277) in call from init:start_em/1 (init.erl, line 1076) in call from init:do_boot/3 (init.erl, line 784)”

I found a file named “erlang_ls” (not a folder) in the directory “c:/Users/21768/.vscode/extensions/erlang-ls.erlang-ls-0.0.40/erlang_ls/_build/default/bin/…,” but nothing else.

Can a kind soul help me?

Hi! To me it sounds like an Erlang/OTP incompatibility issue. You are using a version of the extension compiled with a version of Erlang which is newer of the one you have installed.

Either upgrade Erlang on your machine or compile the language server with your version of Erlang, instead of using the pre-built version.

1 Like