oraios/serena · error · FileNotFoundError
{LS_BIN_NAME} executable not found at {executable_path}; npm
Error message
{LS_BIN_NAME} executable not found at {executable_path}; npm install of {package_name}@{package_version} did not produce the expected binary. What it means
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.
Source
Thrown at src/solidlsp/language_servers/vscode_html_language_server.py:104
executable_path += ".cmd"
if not os.path.exists(executable_path):
expected_version = f"{package_name}@{package_version}"
log.info("Installing %s for HTML language server...", expected_version)
deps = RuntimeDependencyCollection(
[
RuntimeDependency(
id=package_name,
description=f"{package_name} (provides {LS_BIN_NAME})",
command=build_npm_install_command(package_name, package_version, npm_registry),
platform_id="any",
),
]
)
deps.install(install_dir)
if not os.path.exists(executable_path):
raise FileNotFoundError(
f"{LS_BIN_NAME} executable not found at {executable_path}; "
f"npm install of {package_name}@{package_version} did not produce the expected binary."
)
return executable_path
def _create_launch_command(self, core_path: str) -> list[str]:
return [core_path, "--stdio"]
def _create_base_initialize_params(self) -> dict:
initialize_params: dict = {
"locale": "en",
"capabilities": {
"textDocument": {
"synchronization": {"didSave": True, "dynamicRegistration": True},
"completion": {"dynamicRegistration": True, "completionItem": {"snippetSupport": True}},
"definition": {"dynamicRegistration": True},
"references": {"dynamicRegistration": True},
"documentSymbol": {View on GitHub (pinned to 7fcbca7e62)
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.
Example fix
// before: pin a version whose binary layout changed package_version = "1.4.0" // after: pin a known-good version and pre-verify // $ npm install -g @vscode/vscode-languageserver-node-html@1.5.1 package_version = "1.5.1" // version confirmed to ship vscode-html-language-server bin
Defensive patterns
Strategy: try-catch
Validate before calling
import os
if not os.path.isfile(expected_html_ls_binary):
subprocess.run(["npm", "install", "-g", package_name + "@" + package_version], check=True)
assert os.path.exists(expected_html_ls_binary), "binary still missing after install" Type guard
def is_executable_file(path: str) -> bool:
return os.path.isfile(path) and os.access(path, os.X_OK) Try / catch
try:
ls = SolidLSP("html", repo_path)
except FileNotFoundError as e:
if "executable not found" in str(e):
shutil.rmtree(install_dir, ignore_errors=True)
ls = SolidLSP("html", repo_path) # clean reinstall
else:
raise Prevention
- 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.
When it happens
Trigger: _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.
Common situations: 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.
Related errors
- vscode-json-languageserver executable not found at {json_exe
- typescript-language-server executable not found at {tsserver
- vue-language-server executable not found at {vue_executable_
- typescript-language-server executable not found at {ts_ls_ex
- yaml-language-server executable not found at {yaml_executabl
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/6d52604026daf3e9.
Report an issue: GitHub.