Skip to content

Pin bundled TypeScript to v6.0.3 to fix server crash with TypeScript 7 - #134

Merged
MrSubidubi merged 1 commit into
zed-extensions:mainfrom
levanlinchik:fix/pin-bundled-typescript
Jul 14, 2026
Merged

Pin bundled TypeScript to v6.0.3 to fix server crash with TypeScript 7#134
MrSubidubi merged 1 commit into
zed-extensions:mainfrom
levanlinchik:fix/pin-bundled-typescript

Conversation

@levanlinchik

Copy link
Copy Markdown
Contributor

Pin the bundled TypeScript to 6.0.3 instead of installing typescript@latest, and keep the copy next to the language server at that version unconditionally (the worktree package.json check is removed, see below).

typescript@latest on npm is 7.x since July 8. That's the native Go compiler, and its npm package no longer ships the JS API (ts.server, createLanguageService, ...), so @vue/language-server crashes at startup:
TypeError: Cannot read properties of undefined (reading 'protocol')

6.0.3 is the last JS-based release and it's what vuejs/language-tools pin themselves. Volar isn't expected to work with TS 7 until the new compiler API ships (planned for 7.1).

The "skip install when the project has its own typescript" check is removed because:

  • the server resolves typescript relative to its own install dir only, so the worktree copy was never actually used
  • npm install @vue/language-server pulls typescript@latest in as a peer dependency anyway, so a broken 7.x copy ends up in the extension dir even when we skip our own install

The version check runs on every server start, so existing broken installs self-heal: installed 7.0.2 != 6.0.3 triggers a reinstall.

@cla-bot

cla-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @levanlinchik on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@levanlinchik

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jul 11, 2026
@cla-bot

cla-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@MrSubidubi MrSubidubi changed the title Pin bundled TypeScript to 6.0.3 to fix server crash with TypeScript 7 Pin bundled TypeScript to v6.0.3 to fix server crash with TypeScript 7 Jul 14, 2026

@MrSubidubi MrSubidubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks and thank you for the good explanation!

@MrSubidubi
MrSubidubi merged commit bb00a3a into zed-extensions:main Jul 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants