oraios/serena · error · FileNotFoundError

typescript-language-server executable not found at {ts_ls_ex

Error message

typescript-language-server executable not found at {ts_ls_executable_path}, something went wrong with the installation.

What it means

Thrown as FileNotFoundError during VueLanguageServer setup when the companion typescript-language-server executable is missing at ts_ls_executable_path after installation. The Vue server requires both vue-language-server and typescript-language-server; this is the second of the two existence checks.

Source

Thrown at src/solidlsp/language_servers/vue_language_server.py:614

            # No version file exists, assume old installation needs refresh
            log.info("Vue Language Server version file not found. Reinstalling to ensure correct version...")
            needs_install = True

        if needs_install:
            log.info("Installing Vue/TypeScript Language Server dependencies...")
            deps.install(vue_ls_dir)
            # Write version marker file
            with open(version_file, "w") as f:
                f.write(expected_version)
            log.info("Vue language server dependencies installed successfully")

        if not os.path.exists(vue_executable_path):
            raise FileNotFoundError(
                f"vue-language-server executable not found at {vue_executable_path}, something went wrong with the installation."
            )

        if not os.path.exists(ts_ls_executable_path):
            raise FileNotFoundError(
                f"typescript-language-server executable not found at {ts_ls_executable_path}, something went wrong with the installation."
            )

        return [vue_executable_path, "--stdio"], tsdk_path, ts_ls_executable_path

    def _create_base_initialize_params(self) -> dict:
        initialize_params = {
            "locale": "en",
            "capabilities": {
                "textDocument": {
                    "synchronization": {"didSave": True, "dynamicRegistration": True},
                    "completion": {"dynamicRegistration": True, "completionItem": {"snippetSupport": True}},
                    "definition": {"dynamicRegistration": True, "linkSupport": True},
                    "references": {"dynamicRegistration": True},
                    "documentSymbol": {
                        "dynamicRegistration": True,
                        "hierarchicalDocumentSymbolSupport": True,
                        "symbolKind": {"valueSet": list(range(1, 27))},

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Install typescript-language-server manually: npm install -g typescript typescript-language-server, then point config at it.
  2. Wipe the shared install directory so both dependencies install together on the next run.
  3. Check npm/network errors for the typescript-language-server package specifically.
  4. Verify versions of both packages are compatible with the Vue language server version in use.
  5. Confirm execute permission on ts_ls_executable_path.

Example fix

// before: only vue-language-server installed
# npm install -g @vue/language-server
// after: install both required servers
# npm install -g @vue/language-server typescript typescript-language-server
Defensive patterns

Strategy: try-catch

Validate before calling

import os, shutil
for exe in (vue_executable_path, ts_ls_executable_path):
    if not os.path.isfile(exe):
        subprocess.run(["npm", "install", "-g", "@vue/language-server", "typescript", "typescript-language-server"], check=True)
        break

Type guard

def both_servers_present(vue_path: str, ts_ls_path: str) -> bool:
    import os
    return all(os.path.isfile(p) and os.access(p, os.X_OK) for p in (vue_path, ts_ls_path))

Try / catch

try:
    ls = SolidLSP("vue", repo_path)
except FileNotFoundError as e:
    if "typescript-language-server executable not found" in str(e):
        subprocess.run(["npm", "install", "-g", "typescript", "typescript-language-server"], check=True)
        ls = SolidLSP("vue", repo_path)
    else:
        raise

Prevention

When it happens

Trigger: vue_executable_path exists but the typescript-language-server binary is absent when _setup_runtime_dependencies (called from __init__) performs its final check before returning launch command, tsdk_path, and ts_ls path.

Common situations: typescript-language-server install step skipped or failed while the Vue part succeeded; version mismatch between the Vue server and the TS server packages; proxy/registry blocking one npm package; manual installs providing one binary but not the other.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/6ab2e439167d44f4. Report an issue: GitHub.