T
TanStack2mo ago
flat-fuchsia

Error => Cannot GET /

When trying to run a built version of TanStack Start, I'm just getting Cannot GET /. Everything is working with vite dev and vite build, but even though vite preview boots up error free, navigatin to the page results in said error. This is the same for any route. I haven't added any custom code. Here are the repro steps. - pnpm create @tanstack/start@latest - Opted out of any addons to get a vanilla start - pnpm dev - Loads and everything works - pnpm build - No errors on build - pnpm serve - No boot up errors - Go to http://localhost:####/ - You get the Cannot GET / error. I was running into this issue with another project and thought it was my code, but even the CLI initial example isn't working. Any thoughts on how to fix this? It's a pretty bad first run experience.
1 Reply
flat-fuchsia
flat-fuchsiaOP2mo ago
Ah, this stems from a misunderstanding of how TanStack Start works. vite preview is not supposed to be able to service the whole stack like next does.

Did you find this page helpful?