Add tsx devDependency to ts-starter template#14818
Merged
davidfowl merged 1 commit intorelease/13.2from Mar 1, 2026
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14818Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14818" |
1477976 to
d2cbef0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a hang in aspire start/aspire run for the TypeScript starter template by ensuring tsx is installed locally, and adds an end-to-end regression test that scaffolds and runs the Express/React TypeScript starter.
Changes:
- Add
tsxtodevDependenciesfor thets-startertemplate sonpx tsx apphost.tsdoesn’t prompt to install interactively. - Add a new E2E test that creates a TypeScript starter project via
aspire new --language typescriptand verifiesaspire runstarts successfully.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Aspire.Cli.EndToEnd.Tests/TypeScriptStarterTemplateTests.cs | Adds an E2E regression test that scaffolds and runs the TS Express/React starter template. |
| src/Aspire.Cli/Templating/Templates/ts-starter/package.json | Adds tsx to template devDependencies to avoid npx interactive install prompts/hangs. |
Contributor
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22533473193 |
Without tsx in devDependencies, npx tsx apphost.ts prompts to install it interactively during aspire start, causing the CLI to hang in non-interactive context. Fixes #14815 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d2cbef0 to
5e11144
Compare
JamesNK
approved these changes
Mar 1, 2026
Copilot AI
pushed a commit
that referenced
this pull request
Mar 10, 2026
Without tsx in devDependencies, npx tsx apphost.ts prompts to install it interactively during aspire start, causing the CLI to hang in non-interactive context. Fixes #14815 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Description
The TypeScript starter template (
ts-starter) is missingtsxin itsdevDependencies. Whenaspire startruns, it executesnpx tsx apphost.ts— sincetsxis not installed locally,npxprompts for confirmation to install it. In a non-interactive context this prompt never gets answered, causing the CLI to hang indefinitely.This adds
tsxtodevDependenciesin the template'spackage.jsonand adds an E2E test (TypeScriptStarterTemplateTests) that creates and runs a project from the Express/React starter template to catch regressions like this.Fixes #14815
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: