Tanstack Start attempting to run the build fails
Hi everyone,
I am working on an app using Tanstack Start. I followed the setup instructions here: https://tanstack.com/router/latest/docs/framework/react/start/getting-started
I noticed that running the dev, and build commands (vinxi dev and vinxi build) run fine, however attempting to run vinxi start after a build causes the error reported on this issue:
https://github.com/nksaraf/vinxi/issues/177
I am not sure if this is a vinxi error or related to Tanstack Start. Did any one else run into this issue?
Finally, here is a minimal reproducible repo:
https://github.com/willenleal/tsstart-run-build-error
Thank you in advance, I wanted to ask here before opening an issue, maybe I am missing something 🙂
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.

GitHub
Starting a built project trigger error: Cannot find module '.../.ou...
Problem: I can build the project successfully (vinxi build) but cannot start the built project (vinxi start). This is blocking us from pushing to production now since we upgrade solid-start. Contex...
GitHub
GitHub - willenleal/tsstart-run-build-error
Contribute to willenleal/tsstart-run-build-error development by creating an account on GitHub.
14 Replies
xenial-black•12mo ago
What operating system are you on?
xenial-black•12mo ago
We have an open issue on there being issues on WIndows.
https://github.com/TanStack/router/issues/1889
GitHub
start-basic fails to build on windows · Issue #1889 · TanStack/rout...
Describe the bug Using the start-basic example, when you try to the build script it fails. Your Example Website or App Use the start-basic example Steps to Reproduce the Bug or Issue Clone the star...
wise-whiteOP•12mo ago
I am on Mac OS 14.6 (M1 Chip)
Tanstack Start /Router 1.58.3
Vinxi 0.4.3
xenial-black•12mo ago
We've just released a couple fixes. They aren't targetted at this specificall, but it'll be worth upgrading and confirming the build status.
wise-whiteOP•12mo ago
Hey, I figured out the issue! 😅
Turns out the default deployment preset is Vercel. So when I ran vinxi start, it was looking for the .output folder, which doesn’t exist in Vercel deployments.
After checking the Vinxi repo (https://github.com/nksaraf/vinxi/blob/main/packages/vinxi/bin/cli.mjs), I noticed that node-server is the default for both build and start. However, in Tanstack, the build and start environments aren’t synced by default.
I fixed it by adding the config below, and now everything works! 🎉
I think if would be helpful to add this information to the docs.
foreign-sapphire•12mo ago
you are very welcome to provide a PR to the docs.
wise-whiteOP•12mo ago
@Manuel Schiller sounds good! I can open a PR. Should I add this to the getting started section?
foreign-sapphire•12mo ago
not sure where to put it best, try that and we'll review then
inland-turquoise•12mo ago
Is possible to detect the current environment and auto choose the correct preset by default?
xenial-black•12mo ago
definitely can explore this, its just not the biggest priority atm.
we've still got a major rewrite of server functions thats in the works
for the timebeing i'm updating the docs with the different tested deployment options
xenial-black•12mo ago
@Willen thank you for your PR.
I reviewed it and felt it best went into the hosting guide. Its since been updated and merged.
https://tanstack.com/router/latest/docs/framework/react/start/hosting/#bun
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.

inland-turquoise•12mo ago

xenial-black•12mo ago
Will fix
wise-whiteOP•12mo ago
Sounds good, thank you!