{"record":{"id":"6650e1494408872a","repo":"oraios/serena","slug":"yaml-language-server-executable-not-found-at-yaml","errorCode":null,"errorMessage":"yaml-language-server executable not found at {yaml_executable_path}, something went wrong with the installation.","messagePattern":"yaml-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/yaml_language_server.py","lineNumber":106,"sourceCode":"            ls_dirname = (\n                \"yaml-lsp\"\n                if yaml_language_server_version == INITIAL_YAML_LANGUAGE_SERVER_VERSION\n                else f\"yaml-lsp-{yaml_language_server_version}\"\n            )\n            yaml_ls_dir = os.path.join(self._ls_resources_dir, ls_dirname)\n            yaml_executable_path = os.path.join(yaml_ls_dir, \"node_modules\", \".bin\", \"yaml-language-server\")\n\n            # Handle Windows executable extension\n            if os.name == \"nt\":\n                yaml_executable_path += \".cmd\"\n\n            if not os.path.exists(yaml_executable_path):\n                log.info(f\"YAML Language Server executable not found at {yaml_executable_path}. Installing...\")\n                deps.install(yaml_ls_dir)\n                log.info(\"YAML language server dependencies installed successfully\")\n\n            if not os.path.exists(yaml_executable_path):\n                raise FileNotFoundError(\n                    f\"yaml-language-server executable not found at {yaml_executable_path}, something went wrong with the installation.\"\n                )\n\n            return yaml_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        \"\"\"\n        Returns the initialize params for the YAML 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}},","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/yaml_language_server.py#L88-L124","documentation":"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.","triggerScenarios":"_get_or_install_core_dependency logs 'Installing...', runs deps.install(yaml_ls_dir), then the second os.path.exists check fails.","commonSituations":"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.","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."],"exampleFix":"// before\nls = SolidLSP(\"yaml\", \"/repo\")  # auto-install fails silently behind proxy\n// after\n# export HTTPS_PROXY=http://proxy:8080\n# npm install -g yaml-language-server\nls = SolidLSP(\"yaml\", \"/repo\")  # finds existing install / installs cleanly","handlingStrategy":"try-catch","validationCode":"import os\nif not os.path.isfile(expected_yaml_ls_path):\n    subprocess.run([\"npm\", \"install\", \"-g\", \"yaml-language-server\"], check=True)","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(\"yaml\", repo_path)\nexcept FileNotFoundError as e:\n    if \"yaml-language-server executable not found\" in str(e):\n        shutil.rmtree(yaml_ls_install_dir, ignore_errors=True)\n        subprocess.run([\"npm\", \"install\", \"-g\", \"yaml-language-server\"], check=True)\n        ls = SolidLSP(\"yaml\", repo_path)\n    else:\n        raise","preventionTips":["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."],"tags":["installation","npm","yaml","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"}