microsoft / microsoft/aspire

Detect stale tsx versions when launching TypeScript AppHosts in VS Code

Open
#19,885 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Open an existing TypeScript AppHost whose package lock resolves tsx 4.21.0 or older.
  2. Start or debug the AppHost from VS Code using the Aspire extension.
  3. Observe the tsx warning.
  4. Upgrade tsx to the latest version and reload VS Code.
  5. 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 TypeScriptLanguageSupport still ensures only tsx ^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 tsx version 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.