{"record":{"id":"66594c91a506b647","repo":"oraios/serena","slug":"svelte-companion-typescript-server-did-not-become","errorCode":null,"errorMessage":"Svelte companion TypeScript server did not become ready within {timeout:.0f}s","messagePattern":"Svelte companion TypeScript server did not become ready within (.+?)s","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/svelte_language_server.py","lineNumber":156,"sourceCode":"                    \"languages\": [\"svelte\"],\n                }\n            ],\n            \"tsserver\": {\"path\": self._custom_tsdk_path},\n        }\n        return params\n\n    @override\n    def _start_server(self) -> None:\n        def workspace_configuration_handler(params: dict) -> list:\n            items = params.get(\"items\", [])\n            return [{} for _ in items]\n\n        self.server.on_request(\"workspace/configuration\", workspace_configuration_handler)\n        super()._start_server()\n\n    @override\n    def _handle_server_ready_timeout(self, timeout: float) -> None:\n        raise TimeoutError(f\"Svelte companion TypeScript server did not become ready within {timeout:.0f}s\")\n\n    @override\n    def _handle_project_indexing_timeout(self, timeout: float) -> None:\n        raise TimeoutError(\n            f\"Svelte companion TypeScript server project indexing did not complete within {timeout:.0f}s ({self.describe_indexing_state()})\"\n        )\n\n\nclass SvelteLanguageServer(SolidLanguageServer):\n    \"\"\"\n    Svelte language server using ``svelte-language-server``.\n\n    ``ls_specific_settings[\"svelte\"]`` keys:\n        * ``svelte_language_server_version``: version of ``svelte-language-server``\n          to install (default: ``0.18.0``).\n        * ``npm_registry``: optional alternative npm-compatible registry URL.\n        * ``indexing_timeout``: optional timeout in seconds for companion TS indexing of\n          Svelte files. Falls back to ``ls_specific_settings[\"typescript\"].indexing_timeout``","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/svelte_language_server.py#L138-L174","documentation":"SvelteLanguageServer overrides _handle_server_ready_timeout because its setup also depends on a companion TypeScript (tsserver) process. If the full server + companion pair doesn't signal readiness within the configured timeout, this TimeoutError is raised instead of the generic one, telling you the companion TS server in particular didn't become ready.","triggerScenarios":"Starting the Svelte language server when the workspace/configuration handshake and readiness signal from the Svelte or companion TypeScript server never arrive within the timeout — slow cold starts, huge workspaces, or the server process hanging/crashing before ready.","commonSituations":"First run on cold npm caches downloading packages, very large monorepos, slow CI machines, or broken node/tsserver installs leaving the companion server stuck.","solutions":["Increase the server-ready timeout in the SolidLSP/LanguageServerConfig to accommodate cold starts.","Verify node and TypeScript are installed and that a manual `npx svelte-language-server` (and tsserver) starts cleanly.","Run once with the pre-warmed cache; subsequent starts are usually fast enough.","Check server logs for the companion TypeScript server crashing (missing typescript dependency in the workspace)."],"exampleFix":"// before\ncfg = LanguageServerConfig(\"svelte\", timeout=30)\n// after\ncfg = LanguageServerConfig(\"svelte\", timeout=120)","handlingStrategy":"try-catch","validationCode":"# ensure node/typescript and svelte LS resolvable before init\nimport shutil\nassert shutil.which(\"node\"), \"Node.js required for Svelte + companion TypeScript server\"","typeGuard":"def svelte_server_prereqs_ok() -> bool:\n    import shutil\n    return shutil.which(\"node\") is not None and shutil.which(\"npm\") is not None","tryCatchPattern":"try:\n    server = SvelteLanguageServer(config, repo_root, settings)\n    server.start()\nexcept TimeoutError as e:\n    if \"did not become ready\" in str(e):\n        config.timeout = 120  # retry with a larger ready timeout\n        server = SvelteLanguageServer(config, repo_root, settings)\n        server.start()\n    else:\n        raise","preventionTips":["Set a generous server-ready timeout for cold starts and CI machines.","Pre-warm npm caches (install typescript/svelte LS once) before starting.","Confirm the workspace has typescript installed for the companion tsserver."],"tags":["svelte","typescript","timeout","lifecycle"],"backgroundTag":"lsp-server-start-timeout","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}