#Build & Preview 404
10 messages · Page 1 of 1 (latest)
post a complete project please. also make sure to update to the latest versions
After creating a new TanStack Start project, I get a 404 error when serving the built app — without making any code changes.
npm run build
npm run serve
I got the same exact error
this still applies
I will prepare a project to post it but I believe I have already updated to the latest version
Hi! I'm having the same issue as fmcoder
Environment:
- OS: Windows 11
- Node: v24.7.0
- TanStack Start: 1.132.48
- TanStack Router: 1.132.47
- Vite: 7.1.9
- React: 18.3.1
- pnpm: 9.14.2
Additional Context:
Migrated from React Router to TanStack Start manually following the "Build from Scratch" guide:
https://tanstack.com/start/latest/docs/framework/react/build-from-scratch
- Didn't use the official template to avoid overwriting existing files
- Created routes manually in src/routes/
- Set up __root.tsx following the documentation
- Added server functions with createServerFn in src/server
- Configured vite.config.ts as per the guide
Issue:
pnpm devworks perfectly ✅pnpm buildsucceeds ✅pnpm previewshows "Cannot GET /" ❌node dist/server/server.jsdoesn't start (no output, port not listening) ❌
What i tried
- Using
@netlify/vite-plugin-tanstack-start→ breaks dev mode - Using
vinxi→ errors with__dirnamein ES modules - Using
node dist/server/server.js→ server doesn't listen on any port
Config:
- Using file-based routing
- Server functions with createServerFn
- Tailwind 4 + DaisyUI
Repo
https://github.com/Smailen5/portfolio-website/tree/fix/tanstanck-build-preview
Is there a way to test the production build locally?
[!NOTE] If you chose to quick start with an example or cloned project, you can skip this guide and move on to the guide. So you want to build a TanStack Start project from scratch? This guide will hel...
A lot of the docs pages including that one are showing a 404
we moved some pages around. new link https://tanstack.com/start/latest/docs/framework/react/guide/hosting