Skip to content

Add TanStack Start support - #168

Merged
kylemclaren merged 1 commit into
mainfrom
tanstack-start
Oct 22, 2026
Merged

kylemclaren merged 1 commit into
mainfrom
tanstack-start

Conversation

@kylemclaren

Copy link
Copy Markdown
Contributor

Fixes #161.

Changes

  • Detect TanStack Start from @tanstack/react-start or @tanstack/solid-start in dependencies.
  • If the app uses the nitro vite plugin (the setup in the TanStack Start hosting guide), the command is node .output/server/index.mjs.
  • If not, the command is npx srvx --prod -s ../client dist/server/server.js. vite build writes these files, and srvx is already a dependency of TanStack Start, so it stays after npm prune --omit=dev.
  • As for Nuxt, the command comes from the build setup, not from the start script. The @tanstack/cli Solid template has "start": "node .output/server/index.mjs" but no nitro plugin, so npm run start fails for that template. Use --cmd for a custom server.
  • The runtime label is TanStack.
  • A TanStack Start app with "dev": "vite" is not treated as a static Vite site.

Tests

  • New tanstack-start fixture: Solid template shape (no nitro, with the start script above). It produces the srvx command.
  • New tanstack-start-nitro fixture: React template with nitro. It produces node .output/server/index.mjs.

These apps from @tanstack/cli 1.169.3 build and start in Docker. The page and a static asset respond with HTTP 200:

  • React template.
  • React template with the nitro plugin added.
  • Solid template.

Detect @tanstack/react-start and @tanstack/solid-start. If the app
uses the nitro vite plugin, run .output/server/index.mjs. Otherwise,
serve dist/server/server.js and dist/client with srvx, which TanStack
Start already depends on.

Like Nuxt, the start command comes from the build setup, not the start
script. The Solid template has "start": "node .output/server/index.mjs"
but no nitro plugin, so that script fails.

Fixes #161
@kylemclaren
kylemclaren merged commit ff76b14 into main Oct 22, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TanStack Start: the container does not start

1 participant