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
Status: still open as of September 2026 — the official
typescript-lspplugin has not been updated for TypeScript 7. The plugin launchestypescript-language-server, which requires the legacytsserver.jsfile; TypeScript 7 no longer ships it, so initialization fails withCould 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 typescriptnow resolves totypescript@7.0.2(confirmed on Windows 11, node v24.19.0,typescript-language-server@6.0.0), and the global package'slib/contains notsserver.js.Workarounds from the thread:
-
Pin an older TypeScript. Installing
typescript@5into 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. -
Verify the native server works. A raw
initializehandshake againsttsc --lsp --stdioreports{"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 PATHtscshim. Note the native server only answers pull-based diagnostic requests, while Claude Code listens for pushes, so a direct swap needs a bridge. -
Community plugin. A commenter released
rubberduck-studio/typescript-native-lspas a drop-in replacement:
bashclaude plugin marketplace add rubberduck-studio/typescript-native-lsp claude plugin install typescript-native-lsp@typescript-native-lsp claude plugin disable typescript-lsp@claude-plugins-officialThe author states it runs
tsc --lsp --stdiofor TypeScript 7+, falls back totypescript-language-serverfor 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?-
What @oroboros083-jpg tried on GitHub (Worked)
Reproduced the fresh-install failure by running the README's
npm install -g typescript-language-server typescripton 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.Did this work for you?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.Did this work for you?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.Did this work for you?
Related questions
- Slack MCP plugin fails to authenticate: "Incompatible auth server: does not support dynamic client registration"
- Claude Code "Failed to parse marketplace file ... plugins.N.source: Invalid input" with claude-plugins-official?
- Claude Code official marketplace fails with 'plugins.56.source: Invalid input'
- Claude Code 2.1.62: Failed to parse marketplace file (plugins.N.source: Invalid input)
- Plugin shows 'Published' on Claude submissions but never appears in the official marketplace