oraios/serena · error · RuntimeError

Erlang LS not found. Install from: https://github.com/erlang

Error message

Erlang LS not found. Install from: https://github.com/erlang-ls/erlang_ls

What it means

The Erlang language server wrapper locates the erlang_ls executable via shutil.which at construction time. If it is not on PATH, __init__ raises RuntimeError pointing to the erlang-ls project for installation instructions — Serena does not manage this binary automatically.

Source

Thrown at src/solidlsp/language_servers/erlang_language_server.py:41

"""
The character that replaces the `/` in the `name/arity` identifiers reported by Erlang LS.

`#` was chosen because it cannot occur in an unquoted Erlang atom, so it can never collide with a
real function, type or macro name (unlike `@`, which is a legal atom character).
"""


class ErlangLanguageServer(SolidLanguageServer):
    """Language server for Erlang using Erlang LS."""

    def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):
        """
        Creates an ErlangLanguageServer instance. This class is not meant to be instantiated directly.
        Use LanguageServer.create() instead.
        """
        self.erlang_ls_path = shutil.which("erlang_ls")
        if not self.erlang_ls_path:
            raise RuntimeError("Erlang LS not found. Install from: https://github.com/erlang-ls/erlang_ls")

        if not self._check_erlang_installation():
            raise RuntimeError("Erlang/OTP not found. Install from: https://www.erlang.org/downloads")

        super().__init__(
            config,
            repository_root_path,
            ProcessLaunchInfo(cmd=[self.erlang_ls_path, "--transport", "stdio"], cwd=repository_root_path),
            "erlang",
            solidlsp_settings,
        )

        # Add server readiness tracking like Elixir
        self.server_ready = threading.Event()

        # Set generous timeout for Erlang LS initialization
        self.set_request_timeout(120.0)

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Install erlang-ls: https://github.com/erlang-ls/erlang_ls (build with `make && make install` or your package manager)
  2. Verify with: which erlang_ls (in the same environment that runs Serena)
  3. If built from source, copy/symlink the binary to a directory on PATH (e.g., ~/.local/bin)
  4. Fix PATH for the process launching Serena if it differs from your shell

Example fix

// before
$ which erlang_ls   # not found
// after
$ git clone https://github.com/erlang-ls/erlang_ls && cd erlang_ls
$ make && make install
$ which erlang_ls
/usr/local/bin/erlang_ls
Defensive patterns

Strategy: validation

Validate before calling

import shutil
def erlang_ls_available() -> bool:
    return shutil.which("erlang_ls") is not None

Type guard

def has_erlang_ls() -> bool:
    import shutil
    return shutil.which("erlang_ls") is not None

Try / catch

try:
    server = LanguageServer.create(LanguageServerId.ERLANG, ...)
except RuntimeError as e:
    if "Erlang LS not found" in str(e):
        logger.error("Install erlang-ls: https://github.com/erlang-ls/erlang_ls")

Prevention

When it happens

Trigger: Creating an ErlangLanguageServer instance (via LanguageServer.create) on a system where `erlang_ls` cannot be found on PATH — it was never installed, installed outside PATH, or installed under a different binary name (e.g., erlang_ls vs erlang_ls.exe).

Common situations: Erlang installed via apt but erlang-ls never installed; erlang-ls built from source and not copied to PATH; IDE launching Serena with a different PATH than your shell.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/1cabf0a4e11948c3. Report an issue: GitHub.