oraios/serena · error · FileNotFoundError
yaml-language-server executable not found at {yaml_executabl
Error message
yaml-language-server executable not found at {yaml_executable_path}, something went wrong with the installation. What it means
Thrown as FileNotFoundError when, after attempting deps.install for the yaml-language-server npm package, the yaml-language-server executable still does not exist at yaml_executable_path. It is a post-install sanity check before building the launch command.
Source
Thrown at src/solidlsp/language_servers/yaml_language_server.py:106
ls_dirname = (
"yaml-lsp"
if yaml_language_server_version == INITIAL_YAML_LANGUAGE_SERVER_VERSION
else f"yaml-lsp-{yaml_language_server_version}"
)
yaml_ls_dir = os.path.join(self._ls_resources_dir, ls_dirname)
yaml_executable_path = os.path.join(yaml_ls_dir, "node_modules", ".bin", "yaml-language-server")
# Handle Windows executable extension
if os.name == "nt":
yaml_executable_path += ".cmd"
if not os.path.exists(yaml_executable_path):
log.info(f"YAML Language Server executable not found at {yaml_executable_path}. Installing...")
deps.install(yaml_ls_dir)
log.info("YAML language server dependencies installed successfully")
if not os.path.exists(yaml_executable_path):
raise FileNotFoundError(
f"yaml-language-server executable not found at {yaml_executable_path}, something went wrong with the installation."
)
return yaml_executable_path
def _create_launch_command(self, core_path: str) -> list[str]:
return [core_path, "--stdio"]
def _create_base_initialize_params(self) -> dict:
"""
Returns the initialize params for the YAML Language Server.
"""
initialize_params = {
"locale": "en",
"capabilities": {
"textDocument": {
"synchronization": {"didSave": True, "dynamicRegistration": True},
"completion": {"dynamicRegistration": True, "completionItem": {"snippetSupport": True}},View on GitHub (pinned to 7fcbca7e62)
Solutions
- Delete the yaml language server install directory and rerun to force a clean install.
- Run npm install -g yaml-language-server manually and inspect npm errors.
- Verify Node.js and npm are installed and on PATH.
- Check proxy/registry settings and free disk space.
- Pre-install and configure ls_path to the global yaml-language-server binary.
Example fix
// before
ls = SolidLSP("yaml", "/repo") # auto-install fails silently behind proxy
// after
# export HTTPS_PROXY=http://proxy:8080
# npm install -g yaml-language-server
ls = SolidLSP("yaml", "/repo") # finds existing install / installs cleanly Defensive patterns
Strategy: try-catch
Validate before calling
import os
if not os.path.isfile(expected_yaml_ls_path):
subprocess.run(["npm", "install", "-g", "yaml-language-server"], check=True) 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("yaml", repo_path)
except FileNotFoundError as e:
if "yaml-language-server executable not found" in str(e):
shutil.rmtree(yaml_ls_install_dir, ignore_errors=True)
subprocess.run(["npm", "install", "-g", "yaml-language-server"], check=True)
ls = SolidLSP("yaml", repo_path)
else:
raise Prevention
- Pre-install yaml-language-server globally in CI images.
- Ensure Node.js/npm are installed before first use.
- Clean partial installs from interrupted runs.
- Set proxy/registry env vars so npm installs succeed.
When it happens
Trigger: _get_or_install_core_dependency logs 'Installing...', runs deps.install(yaml_ls_dir), then the second os.path.exists check fails.
Common situations: npm install failing behind proxy/firewall; corrupt or partial node_modules from a prior interrupted install; insufficient permissions or disk space in the install dir; Node/npm not installed so the install is a no-op or fails.
Related errors
- vscode-json-languageserver executable not found at {json_exe
- typescript-language-server executable not found at {tsserver
- {LS_BIN_NAME} executable not found at {executable_path}; npm
- vue-language-server executable not found at {vue_executable_
- typescript-language-server executable not found at {ts_ls_ex
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/6650e1494408872a.
Report an issue: GitHub.