{"record":{"id":"3dea237b50ef7753","repo":"oraios/serena","slug":"elm-language-server-executable-not-found-at-elm-l","errorCode":null,"errorMessage":"elm-language-server executable not found at {elm_ls_executable_path}, something went wrong with the installation.","messagePattern":"elm-language-server executable not found at (.+?), something went wrong with the installation\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/elm_language_server.py","lineNumber":126,"sourceCode":"        )\n\n        # legacy unversioned dir reserved for INITIAL pair; any other version combination goes into a versioned subdir\n        is_initial = (\n            elm_language_server_version == INITIAL_ELM_LANGUAGE_SERVER_VERSION and elm_compiler_version == INITIAL_ELM_COMPILER_VERSION\n        )\n        ls_dirname = \"elm-lsp\" if is_initial else f\"elm-lsp-{elm_language_server_version}-{elm_compiler_version}\"\n        elm_ls_dir = os.path.join(cls.ls_resources_dir(solidlsp_settings), ls_dirname)\n        elm_ls_executable_path = os.path.join(elm_ls_dir, \"node_modules\", \".bin\", \"elm-language-server\")\n        if not os.path.exists(elm_ls_executable_path):\n            log.info(f\"Elm Language Server executable not found at {elm_ls_executable_path}. Installing...\")\n            with LogTime(\"Installation of Elm language server dependencies\", logger=log):\n                deps.install(elm_ls_dir)\n        elif not system_elm:\n            log.info(\"Elm compiler not found on PATH. Installing a managed Elm compiler...\")\n            with LogTime(\"Installation of Elm compiler dependency\", logger=log):\n                deps.install(elm_ls_dir)\n\n        if not os.path.exists(elm_ls_executable_path):\n            raise FileNotFoundError(\n                f\"elm-language-server executable not found at {elm_ls_executable_path}, something went wrong with the installation.\"\n            )\n        return [elm_ls_executable_path, \"--stdio\"]\n\n    def _create_base_initialize_params(self) -> dict:\n        \"\"\"\n        Returns the initialize params for the Elm Language Server.\n        \"\"\"\n        initialize_params = {\n            \"locale\": \"en\",\n            \"capabilities\": {\n                \"textDocument\": {\n                    \"synchronization\": {\"didSave\": True, \"dynamicRegistration\": True},\n                    \"completion\": {\"dynamicRegistration\": True, \"completionItem\": {\"snippetSupport\": True}},\n                    \"definition\": {\"dynamicRegistration\": True},\n                    \"references\": {\"dynamicRegistration\": True},\n                    \"documentSymbol\": {","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/elm_language_server.py#L108-L144","documentation":"Serena manages the elm-language-server binary under a managed-dependencies directory. After attempting to install the language server (and Elm compiler if missing), _setup_runtime_dependencies checks the executable exists; if not, installation failed silently and it raises FileNotFoundError indicating the install went wrong.","triggerScenarios":"Starting the Elm language server when the managed elm-language-server executable is absent at the expected path after deps.install(elm_ls_dir) ran — download failure, wrong Node/npm setup, partial install, or corrupted dependency directory.","commonSituations":"Offline/proxied environments where the npm download fails; global npm misconfiguration; deleting or wiping Serena's managed language-server cache directory mid-install; running as a user without write permission to the install directory.","solutions":["Delete Serena's managed elm-language-server directory (the elm_ls_dir under the managed dependencies cache) and retry so a fresh install runs","Ensure Node.js and npm are installed and on PATH (node --version, npm --version), then restart Serena","Check network/proxy settings if the download failed (set HTTPS_PROXY etc.)","Verify file permissions on the managed dependencies directory allow writing"],"exampleFix":"// before\n$ rm -rf ~/.serena/language_servers/static/elm-language-server   # partially installed\n// after\n$ rm -rf ~/.serena/language_servers/static/elm-language-server   # force clean reinstall\n$ # restart Serena; it re-downloads and validates the executable\n","handlingStrategy":"try-catch","validationCode":"import os\ndef elm_ls_installed(managed_dir: str) -> bool:\n    exe = os.path.join(managed_dir, \"node_modules\", \".bin\", \"elm-language-server\")\n    return os.path.exists(exe) and os.access(exe, os.X_OK)","typeGuard":"def executable_exists(path: str) -> bool:\n    import os\n    return os.path.isfile(path) and os.access(path, os.X_OK)","tryCatchPattern":"try:\n    server = LanguageServer.create(LanguageServerId.ELM, ...)\nexcept FileNotFoundError as e:\n    logger.error(\"Elm LS install broken: %s\", e)\n    clear_managed_deps_dir_and_retry()  # wipe cache and let Serena reinstall","preventionTips":["Ensure Node.js and npm are on PATH before starting Serena","Allow network access to npm registries (configure proxies)","Never partially delete the managed language-server cache; remove whole dirs","Verify disk space and write permissions in the managed dependencies directory"],"tags":["elm","installation-failed","file-not-found","language-server"],"backgroundTag":"managed-dependency-install-failed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}