{"record":{"id":"1407c8a52c1a6a69","repo":"oraios/serena","slug":"executable-not-found-at-executable-path-npm-ins","errorCode":null,"errorMessage":"executable not found at {executable_path}; npm install of svelte-language-server@{package_version} did not produce the expected binary.","messagePattern":"executable not found at (.+?); npm install of svelte-language-server@(.+?) did not produce the expected binary\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/svelte_language_server.py","lineNumber":264,"sourceCode":"                    RuntimeDependency(\n                        id=\"typescript-language-server\",\n                        description=\"TypeScript language server (companion)\",\n                        command=build_npm_install_command(\"typescript-language-server\", typescript_language_server_version, npm_registry),\n                        platform_id=\"any\",\n                    ),\n                    RuntimeDependency(\n                        id=\"typescript-svelte-plugin\",\n                        description=\"TypeScript plugin for Svelte cross-file awareness\",\n                        command=build_npm_install_command(\"typescript-svelte-plugin\", typescript_svelte_plugin_version, npm_registry),\n                        platform_id=\"any\",\n                    ),\n                ]\n                RuntimeDependencyCollection(runtime_deps).install(install_dir)\n                with open(version_file, \"w\") as fv:\n                    fv.write(expected_version)\n\n            if not os.path.exists(executable_path):\n                raise FileNotFoundError(\n                    f\"executable not found at {executable_path}; \"\n                    f\"npm install of svelte-language-server@{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            # stdio suits SolidLSP's subprocess RPC; other hosts may use a different transport.\n            return [core_path, \"--stdio\"]\n\n    @override\n    def _create_dependency_provider(self) -> LanguageServerDependencyProvider:\n        ts_settings = self._solidlsp_settings.get_ls_specific_settings(LanguageServerId.TYPESCRIPT)\n        return self.DependencyProvider(self._custom_settings, self._ls_resources_dir, ts_settings)\n\n    def __init__(self, config: LanguageServerConfig, repo_path: str, solidlsp_settings: SolidLSPSettings):\n        resolved_root = os.path.abspath(repo_path)\n        super().__init__(\n            config,","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/svelte_language_server.py#L246-L282","documentation":"The Svelte language server dependency installer runs `npm install` for svelte-language-server plus companion packages into a versioned directory, then verifies the expected binary exists at `<install_dir>/node_modules/.bin/svelte-language-server`. If npm exits without producing that binary (or the .cmd shim on Windows), this FileNotFoundError is raised because launching the LSP would fail anyway. It signals a silently failed or incomplete npm install rather than a crash during install.","triggerScenarios":"Calling SolidLSP with LanguageServerId.SVELTE when the runtime dependency auto-install runs `RuntimeDependencyCollection(...).install(install_dir)` for svelte-language-server@<version> and the expected executable is still missing afterwards — e.g. npm failed silently, an empty/partial version file marked the install as current, a custom `svelte_language_server_version` setting points at a version whose binary name differs, or the custom npm registry returned an incomplete package.","commonSituations":"Custom npm registry or offline mirror lacking the package or its bin entry; corporate proxy stripping bin links; disk-full or permission-denied installs inside _ls_resources_dir; setting `svelte_language_server_version` in ls-specific settings to a typos or prerelease version; Windows where the `.cmd` shim was not generated; a stale version_file causing the code to skip reinstall of a corrupted install.","solutions":["Delete the versioned install dir `<ls_resources_dir>/svelte-lsp-<version>` (and its version file) so the next run reinstalls from scratch, then retry.","Run the underlying npm install manually (`npm install svelte-language-server@<version> typescript@<ts> typescript-language-server@<tls> typescript-svelte-plugin@<tsp> --prefix <install_dir>`) to see the real npm error.","Verify the `svelte_language_server_version` setting matches a published release that ships a `bin` entry; fix typos or pin a known-good version like 0.18.0.","Check npm connectivity: proxy/registry env vars (npm_config_registry, HTTPS_PROXY) and disk space/permissions on the resources directory.","On Windows confirm the check path expectation (`svelte-language-server.cmd`) is produced; if npm skips .shim generation, reinstall with a working npm."],"exampleFix":"// before (custom version that doesn't publish a binary)\nsettings = {\"svelte_language_server_version\": \"0.18.1-beta.0\"}\n// after\nsettings = {\"svelte_language_server_version\": \"0.18.0\"}\n# and clear the stale install:\n# rm -rf ~/.codeium/.../svelte-lsp-0.18.0","handlingStrategy":"validation","validationCode":"import os\nexe = os.path.join(resources_dir, f\"svelte-lsp-{version}\", \"node_modules\", \".bin\",\n                   \"svelte-language-server\" + (\".cmd\" if os.name == \"nt\" else \"\"))\nif not os.path.exists(exe):\n    # clean the versioned install dir before starting the LS\n    shutil.rmtree(os.path.join(resources_dir, f\"svelte-lsp-{version}\"), ignore_errors=True)","typeGuard":null,"tryCatchPattern":"try:\n    server = SolidLSP(SvelteConfig)\nexcept FileNotFoundError as e:\n    if \"svelte-language-server\" in str(e):\n        shutil.rmtree(install_dir, ignore_errors=True)\n        server = retry_start()  # forces clean reinstall\n    else:\n        raise","preventionTips":["Pin a published, stable svelte_language_server_version with a bin entry","Ensure npm registry/proxy settings work in your environment before first run","Don't hand-edit or truncate the version file inside svelte-lsp-<version>","Check disk space and write permissions on the LS resources dir","Run `npm install ... --prefix <install_dir>` once manually to validate the environment"],"tags":["npm","dependency-installation","svelte","language-server","file-not-found"],"backgroundTag":"npm-install-binary-missing","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}