Detect stale tsx versions when launching TypeScript AppHosts in VS Code
Open
@ellahathaway is already working on this.
Since Sep 3, 2026.
area-polyglot
area-vscode
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 197
Description
Summary
TypeScript AppHosts can show a runtime warning when VS Code launches the project's installed tsx and the lockfile still resolves tsx 4.21.0 or older.
The immediate workaround is:
npm install --save-dev tsx@latest
VS Code must then be reloaded before the warning disappears.
Reproduction
- Open an existing TypeScript AppHost whose package lock resolves
tsx4.21.0 or older. - Start or debug the AppHost from VS Code using the Aspire extension.
- Observe the
tsxwarning. - Upgrade
tsxto the latest version and reload VS Code. - Start or debug the AppHost again; the warning no longer appears.
Current behavior
- The current TypeScript starter references
tsx ^4.22.3, so newly installed projects normally avoid this. - Existing projects can retain the stale version in their lockfile.
- The brownfield TypeScript setup in
TypeScriptLanguageSupportstill ensures onlytsx ^4.21.0, which does not prevent the affected version. - Aspire launches the app's locally installed
tsx, but does not detect this condition or explain the corrective action.
Expected behavior
Aspire should prevent or diagnose this condition rather than relying on users to recognize a tsx warning. Possible approaches:
- raise the minimum
tsxversion used by TypeScript AppHost setup; - detect the resolved installed version during tooling validation and provide an actionable message; or
- add a focused troubleshooting note until existing projects are covered by product diagnostics.
The diagnostic should account for npm, pnpm, Yarn, and Bun projects and should tell VS Code users to reload the window after updating the dependency when necessary.
Created from a Microsoft Teams conversation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.