{"record":{"id":"6d52604026daf3e9","repo":"oraios/serena","slug":"ls-bin-name-executable-not-found-at-executable-6d5260","errorCode":null,"errorMessage":"{LS_BIN_NAME} executable not found at {executable_path}; npm install of {package_name}@{package_version} did not produce the expected binary.","messagePattern":"(.+?) executable not found at (.+?); npm install of (.+?)@(.+?) did not produce the expected binary\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/vscode_html_language_server.py","lineNumber":104,"sourceCode":"                executable_path += \".cmd\"\n\n            if not os.path.exists(executable_path):\n                expected_version = f\"{package_name}@{package_version}\"\n                log.info(\"Installing %s for HTML language server...\", expected_version)\n                deps = RuntimeDependencyCollection(\n                    [\n                        RuntimeDependency(\n                            id=package_name,\n                            description=f\"{package_name} (provides {LS_BIN_NAME})\",\n                            command=build_npm_install_command(package_name, package_version, npm_registry),\n                            platform_id=\"any\",\n                        ),\n                    ]\n                )\n                deps.install(install_dir)\n\n            if not os.path.exists(executable_path):\n                raise FileNotFoundError(\n                    f\"{LS_BIN_NAME} executable not found at {executable_path}; \"\n                    f\"npm install of {package_name}@{package_version} did not produce the expected binary.\"\n                )\n            return executable_path\n\n        def _create_launch_command(self, core_path: str) -> list[str]:\n            return [core_path, \"--stdio\"]\n\n    def _create_base_initialize_params(self) -> dict:\n        initialize_params: dict = {\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":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/vscode_html_language_server.py#L86-L122","documentation":"Thrown as FileNotFoundError when npm installation of the vscode-html-languageserver package finishes but the expected LS binary (vscode-html-language-server) is not found at executable_path. It guards the launch path so the server is never started against a missing binary.","triggerScenarios":"_get_or_install_core_dependency runs deps.install(install_dir) for the html language server package, then the existence check for LS_BIN_NAME fails.","commonSituations":"Wrong package_version pinned that no longer ships the binary; npm failing silently behind a proxy; OS-specific bin layout differences (npm bin dir not where the code expects); partial or corrupted node_modules; permission problems in install_dir.","solutions":["Remove install_dir and retry so deps.install performs a clean npm install.","Verify the pinned package_name@package_version actually publishes the expected binary (run npm ls / inspect package bin field).","Run the npm install manually in install_dir and read the npm output for the real failure.","Check network/proxy settings and disk/permission issues affecting the install directory.","Pre-install globally and configure ls_path to point at the existing binary."],"exampleFix":"// before: pin a version whose binary layout changed\npackage_version = \"1.4.0\"\n// after: pin a known-good version and pre-verify\n// $ npm install -g @vscode/vscode-languageserver-node-html@1.5.1\npackage_version = \"1.5.1\"  // version confirmed to ship vscode-html-language-server bin","handlingStrategy":"try-catch","validationCode":"import os\nif not os.path.isfile(expected_html_ls_binary):\n    subprocess.run([\"npm\", \"install\", \"-g\", package_name + \"@\" + package_version], check=True)\n    assert os.path.exists(expected_html_ls_binary), \"binary still missing after install\"","typeGuard":"def is_executable_file(path: str) -> bool:\n    return os.path.isfile(path) and os.access(path, os.X_OK)","tryCatchPattern":"try:\n    ls = SolidLSP(\"html\", repo_path)\nexcept FileNotFoundError as e:\n    if \"executable not found\" in str(e):\n        shutil.rmtree(install_dir, ignore_errors=True)\n        ls = SolidLSP(\"html\", repo_path)  # clean reinstall\n    else:\n        raise","preventionTips":["Pin a package_version known to publish the expected binary and test it once in CI.","Perform a clean install (delete install_dir) after any interrupted run.","Pre-install globally and set ls_path rather than depending on runtime npm installs.","Validate network/proxy config before first launch."],"tags":["installation","npm","html","file-not-found"],"backgroundTag":"language-server-install-failed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}