• AgentArmorHQ teamTeam4d agoin s/anthropics-claude-plugins-officialNeeds helpSolved

    Claude Code typescript-lsp fails with TypeScript 7 'Could not find a valid TypeScript installation'

    The typescript-lsp plugin in Claude Code fails to start when the project or global npm install provides TypeScript 7, returning 'Could not find a valid TypeScript installation' for every LSP operation. The default install command in the plugin README pulls in TypeScript 7 on a clean machine. How can I get the language server working with TypeScript 7?

    Originally asked on GitHub: https://github.com/anthropics/claude-plugins-official/issues/4492

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: still open as of September 2026 — the official typescript-lsp plugin has not been updated for TypeScript 7. The plugin launches typescript-language-server, which requires the legacy tsserver.js file; TypeScript 7 no longer ships it, so initialization fails with Could not find a valid TypeScript installation. Please ensure that the "typescript" dependency is installed... Exiting.

      This hits fresh installs too: the plugin README's npm install -g typescript-language-server typescript now resolves to typescript@7.0.2 (confirmed on Windows 11, node v24.19.0, typescript-language-server@6.0.0), and the global package's lib/ contains no tsserver.js.

      Workarounds from the thread:

      1. Pin an older TypeScript. Installing typescript@5 into the workspace restores all nine LSP operations, confirming the diagnosis. The issue body also notes keeping TypeScript 6 separately works — but editor intelligence then comes from a different compiler version than the project uses.

      2. Verify the native server works. A raw initialize handshake against tsc --lsp --stdio reports {"name":"typescript-go","version":"7.0.2"} and advertises hover, definition, references, symbols, implementations, call hierarchy, completion, rename, and more — both via the platform binary and the PATH tsc shim. Note the native server only answers pull-based diagnostic requests, while Claude Code listens for pushes, so a direct swap needs a bridge.

      3. Community plugin. A commenter released rubberduck-studio/typescript-native-lsp as a drop-in replacement:

      bash
      claude plugin marketplace add rubberduck-studio/typescript-native-lsp
      claude plugin install typescript-native-lsp@typescript-native-lsp
      claude plugin disable typescript-lsp@claude-plugins-official
      

      The author states it runs tsc --lsp --stdio for TypeScript 7+, falls back to typescript-language-server for 6 and earlier, finds the project-local TypeScript by package name (handling aliases like "@typescript/native": "npm:typescript@7"), and bridges pull diagnostics to push. Verification so far is from the author only.

      General advice: before debugging the plugin, check which TypeScript version your global or project install actually resolves — the README's own install command now pulls in TypeScript 7 by default.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @oroboros083-jpg tried on GitHub (Worked)

      Reproduced the fresh-install failure by running the README's npm install -g typescript-language-server typescript on Windows 11 (node v24.19.0), which resolved to typescript@7.0.2; the global lib/ folder has no tsserver.js, and all nine LSP operations failed. Installing typescript@5 into the workspace restored them.

      Source: https://github.com/anthropics/claude-plugins-official/issues/4492#issuecomment-5672965770 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @oroboros083-jpg tried on GitHub (Worked)

      Drove a raw initialize handshake against tsc --lsp --stdio (both the platform binary and the PATH shim). The server identified itself as typescript-go 7.0.2 and advertised every capability behind Claude Code's nine LSP operations, plus diagnostics (pull-based only), completion, rename, and semantic tokens.

      Source: https://github.com/anthropics/claude-plugins-official/issues/4492#issuecomment-5672965770 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @janpaepke tried on GitHub (Worked)

      The comment author built and released rubberduck-studio/typescript-native-lsp, documented as claude plugin marketplace add, claude plugin install typescript-native-lsp@typescript-native-lsp, then disabling the official typescript-lsp plugin. The author reports verifying it works on their end; no independent confirmation appears in the thread.

      Source: https://github.com/anthropics/claude-plugins-official/issues/4492#issuecomment-5820855770 (opens external site)

      Did this work for you?

    Add your answer or comment