Skip to content

add server framework detection and overrides for tanstack - #3

Closed
HomelessDinosaur wants to merge 1 commit into
mainfrom
NIT-1230
Closed

add server framework detection and overrides for tanstack#3
HomelessDinosaur wants to merge 1 commit into
mainfrom
NIT-1230

Conversation

@HomelessDinosaur

Copy link
Copy Markdown
Member

No description provided.

Comment thread detect.go
// so railpack serves the build output as a static SPA. Nitro emits a server
// at .output/server/index.mjs (same as Nuxt). @tanstack/start is the old name.
if c.pkg.hasAnyDependency("@tanstack/react-start", "@tanstack/solid-start", "@tanstack/start") {
return serverFramework{Name: "TanStack Start", StartCmd: "node .output/server/index.mjs"}, true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this use the detected runtime? If the railpack output uses a bun base image for the runtime as an example this will fail as node will not be available

@HomelessDinosaur

Copy link
Copy Markdown
Member Author

When this PR gets merged this can be closed and have a different approach using the custom providers. railwayapp/railpack#588

@HomelessDinosaur
HomelessDinosaur marked this pull request as draft June 15, 2026 03:25
tjholm pushed a commit that referenced this pull request Aug 14, 2026
* fix: bump railpack to v0.36.4 so Vite server apps deploy

TanStack Start apps failed with `"/app/dist": not found`: detection saw
Vite, concluded static site, and looked for a dist the app never produces.
TanStack Start detection landed upstream in railpack v0.36.0, thirteen
minor versions ahead of the v0.23.0 we vendored.

- railpack v0.23.0 -> v0.36.4 (moby/buildkit v0.28.1 -> v0.32.2 with it)
- NewBuildGraph gained a noCache arg, so --no-cache now reaches the graph
- GenerateBuildPlan now returns an error for transient failures only;
  report those differently from a deterministic planning failure
- RAILPACK_VERSION is read from build info, so it cannot disagree with go.mod
- the plan step now states the static-site assumption and how to override
  it, before the build that would fail on it
- dependabot gives railpack its own weekly PR rather than a grouped bump
- detection tests over TanStack Start (with and without a start script)
  and plain Vite fixtures

Closes NIT-1655. Also covers NIT-1230, whose closed PR #3 hand-rolled the
detection upstream now does.

* test: drop framework detection fixtures

Framework detection is railpack's to test. Keep the tests covering our own
handling of the plan it produces: the static-site warning, the output dirs
it names, and the version we report.

* refactor: drop node-specific static site warning from the plan path

Per review: the version bump should land on its own, and node-specific
guidance does not belong in the hot path for every build. The warning is
better placed alongside package analysis that can name the framework it
actually found.
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.

2 participants