oraios/serena · error · TimeoutError
Svelte companion TypeScript server did not become ready…
Error message
Svelte companion TypeScript server did not become ready within {timeout:.0f}s What it means
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.
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).
Example fix
// before
cfg = LanguageServerConfig("svelte", timeout=30)
// after
cfg = LanguageServerConfig("svelte", timeout=120) Defensive patterns
Strategy: try-catch
Validate before calling
# ensure node/typescript and svelte LS resolvable before init
import shutil
assert shutil.which("node"), "Node.js required for Svelte + companion TypeScript server" Type guard
def svelte_server_prereqs_ok() -> bool:
import shutil
return shutil.which("node") is not None and shutil.which("npm") is not None Try / catch
try:
server = SvelteLanguageServer(config, repo_root, settings)
server.start()
except TimeoutError as e:
if "did not become ready" in str(e):
config.timeout = 120 # retry with a larger ready timeout
server = SvelteLanguageServer(config, repo_root, settings)
server.start()
else:
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: First run on cold npm caches downloading packages, very large monorepos, slow CI machines, or broken node/tsserver installs leaving the companion server stuck.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Companion TypeScript server did not finish indexing
- Svelte companion TypeScript server project indexing did not…
- Failed to open Svelte file(s) on companion TypeScript server
- Could not connect to
- executable not found at
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/66594c91a506b647.
Report an issue: GitHub.
Appendix: source
Thrown at src/solidlsp/language_servers/svelte_language_server.py:156
"languages": ["svelte"],
}
],
"tsserver": {"path": self._custom_tsdk_path},
}
return params
@override
def _start_server(self) -> None:
def workspace_configuration_handler(params: dict) -> list:
items = params.get("items", [])
return [{} for _ in items]
self.server.on_request("workspace/configuration", workspace_configuration_handler)
super()._start_server()
@override
def _handle_server_ready_timeout(self, timeout: float) -> None:
raise TimeoutError(f"Svelte companion TypeScript server did not become ready within {timeout:.0f}s")
@override
def _handle_project_indexing_timeout(self, timeout: float) -> None:
raise TimeoutError(
f"Svelte companion TypeScript server project indexing did not complete within {timeout:.0f}s ({self.describe_indexing_state()})"
)
class SvelteLanguageServer(SolidLanguageServer):
"""
Svelte language server using ``svelte-language-server``.
``ls_specific_settings["svelte"]`` keys:
* ``svelte_language_server_version``: version of ``svelte-language-server``
to install (default: ``0.18.0``).
* ``npm_registry``: optional alternative npm-compatible registry URL.
* ``indexing_timeout``: optional timeout in seconds for companion TS indexing of
Svelte files. Falls back to ``ls_specific_settings["typescript"].indexing_timeout``View on GitHub (pinned to 7fcbca7e62)