Repository navigation
fix: the TypeScript Language Server template installs TypeScript 6, as TypeScript 7 has no tsserver - #2345
Merged
lagergren merged 1 commit intoNov 28, 2026
Conversation
…s TypeScript 7 has no tsserver The installer ran npm install typescript-language-server typescript, and npm's default TypeScript has been TypeScript 7 since July 2026. It has no tsserver, which typescript-language-server needs (typescript-language-server#1110), so a server installed from the template failed to start with "Could not find a valid TypeScript installation". The installer now installs typescript@6. The docs page says why, and how to fix a server created from the template before, which keeps its own installer.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2345 +/- ##
=======================================
Coverage 58.64% 58.65%
=======================================
Files 849 849
Lines 36719 36719
Branches 7609 7609
=======================================
+ Hits 21535 21536 +1
- Misses 12186 12189 +3
+ Partials 2998 2994 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
@coderabbitai review |
Action performed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The TypeScript Language Server template installs
typescript@6. This is for 0.30.2, since the template has been broken for every new install since 2026-07-08.Behaviour change
npm install typescript-language-server typescript --force, and npm's defaulttypescripthas been 7.x since 2026-07-08. TypeScript 7 has no tsserver, which typescript-language-server needs (typescript-language-server#1110). So a server installed from the template failed itsinitializewith "Could not find a valid TypeScript installation … Exiting." The installer now runsnpm install typescript-language-server typescript@6 --force.The docs page says why. It also says how to fix a server created from the template before: such a server keeps its own copy of the installer, so it keeps installing TypeScript 7.
Checked
On macOS arm64, in a folder laid out as
$USER_HOME$/.lsp4ij/lsp/typescript-language-server/node_modules, which is where the installer runs:node_modules/typescripthas onlytsc, and the server answeredinitializewith the error above. In a test IDE, through LSP4IJ, the server stopped without a single semantic token.initializeand atextDocument/semanticTokens/fullrequest, and in a test IDE it gave 33 semantic tokens for a sample file.Tests
TypeScriptLanguageServerTemplateTest: checks that the installer's command installstypescript@6on every OS. It fails onmain.Not in this PR
A template for TypeScript 7 itself, whose native compiler has no tsserver.