#Build & Preview 404

10 messages · Page 1 of 1 (latest)

cinder breach
#

run into a 404 at the preview mode. defined the app as SPA. spa: { enabled: true }

Cannot GET /

can anyone support me?

atomic sail
#

post a complete project please. also make sure to update to the latest versions

wary harness
#

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

cinder breach
#

I got the same exact error

cinder breach
#

I will prepare a project to post it but I believe I have already updated to the latest version

mellow arrow
#

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 dev works perfectly ✅
  • pnpm build succeeds ✅
  • pnpm preview shows "Cannot GET /" ❌
  • node dist/server/server.js doesn't start (no output, port not listening) ❌

What i tried

  • Using @netlify/vite-plugin-tanstack-start → breaks dev mode
  • Using vinxi → errors with __dirname in 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...

GitHub

Sito portfolio e di presentazione, qui e possibile vedere una parte dei miei lavori e i progetti in corso. - GitHub - Smailen5/portfolio-website at fix/tanstanck-build-preview

atomic sail
rough sierra
#

A lot of the docs pages including that one are showing a 404

atomic sail