{"record":{"id":"ce6493f261748c8e","repo":"oraios/serena","slug":"erlang-otp-not-found-install-from-https-www-er","errorCode":null,"errorMessage":"Erlang/OTP not found. Install from: https://www.erlang.org/downloads","messagePattern":"Erlang/OTP not found\\. Install from: https://www\\.erlang\\.org/downloads","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/erlang_language_server.py","lineNumber":44,"sourceCode":"`#` was chosen because it cannot occur in an unquoted Erlang atom, so it can never collide with a\nreal function, type or macro name (unlike `@`, which is a legal atom character).\n\"\"\"\n\n\nclass ErlangLanguageServer(SolidLanguageServer):\n    \"\"\"Language server for Erlang using Erlang LS.\"\"\"\n\n    def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):\n        \"\"\"\n        Creates an ErlangLanguageServer instance. This class is not meant to be instantiated directly.\n        Use LanguageServer.create() instead.\n        \"\"\"\n        self.erlang_ls_path = shutil.which(\"erlang_ls\")\n        if not self.erlang_ls_path:\n            raise RuntimeError(\"Erlang LS not found. Install from: https://github.com/erlang-ls/erlang_ls\")\n\n        if not self._check_erlang_installation():\n            raise RuntimeError(\"Erlang/OTP not found. Install from: https://www.erlang.org/downloads\")\n\n        super().__init__(\n            config,\n            repository_root_path,\n            ProcessLaunchInfo(cmd=[self.erlang_ls_path, \"--transport\", \"stdio\"], cwd=repository_root_path),\n            \"erlang\",\n            solidlsp_settings,\n        )\n\n        # Add server readiness tracking like Elixir\n        self.server_ready = threading.Event()\n\n        # Set generous timeout for Erlang LS initialization\n        self.set_request_timeout(120.0)\n\n    @override\n    def _document_symbols_cache_fingerprint(self) -> Hashable:\n        normalize_symbol_name_version = 1","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/erlang_language_server.py#L26-L62","documentation":"After confirming erlang_ls exists, the Erlang language server also verifies the Erlang/OTP runtime itself via _check_erlang_installation. If Erlang/OTP is missing or non-functional, __init__ raises RuntimeError directing you to the official Erlang downloads page, since the language server requires a working Erlang runtime.","triggerScenarios":"Creating an ErlangLanguageServer instance where erlang_ls is on PATH but the underlying `erl`/Erlang runtime check fails — Erlang not installed, broken OTP install, or erl not resolvable in the running environment.","commonSituations":"Installing only erlang-ls (which doesn't bundle OTP); Erlang removed during a system cleanup; kerl/asdf-managed Erlang not activated; minimal Docker images lacking the erlang runtime.","solutions":["Install Erlang/OTP: https://www.erlang.org/downloads (e.g., apt install erlang, brew install erlang)","Verify with: erl -version (must succeed in the environment running Serena)","If using asdf/kerl, activate the Erlang version so non-interactive shells see erl","Reinstall erlang_ls if it was built against a removed OTP version"],"exampleFix":"// before\n$ erl -version   # command not found\n// after\n$ apt-get install -y erlang\n$ erl -version\nEshell V14.0\n","handlingStrategy":"validation","validationCode":"import shutil, subprocess\ndef erlang_otp_available() -> bool:\n    return shutil.which(\"erl\") is not None and subprocess.run(\n        [\"erl\", \"+V\"], capture_output=True\n    ).returncode == 0","typeGuard":"def has_erlang() -> bool:\n    import shutil\n    return shutil.which(\"erl\") is not None","tryCatchPattern":"try:\n    server = LanguageServer.create(LanguageServerId.ERLANG, ...)\nexcept RuntimeError as e:\n    if \"Erlang/OTP not found\" in str(e):\n        logger.error(\"Install Erlang/OTP: https://www.erlang.org/downloads\")","preventionTips":["Install Erlang/OTP before erlang-ls in setup scripts","Verify `erl -version` in bootstrap checks","Activate asdf/kerl-managed Erlang for non-interactive shells","Pin OTP versions in Dockerfiles"],"tags":["erlang","otp","missing-dependency","environment-setup"],"backgroundTag":"missing-dependency-on-path","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}