Environment
Environment
- Bun 1.3.2
- Vercel project using Bun runtime
- Nitro
^3.0.1-alpha.1, TanStack React Start ^1.132.31, Vite ^7.0.2
- Deployment URL example:
<your-deployment-url>
- Logs show internal error right after
[env] VITE_SERVER_URL resolved … (no additional stack trace).
Reproduction
-
Repo configured with:
-
Scripts
{
"dev": "bun --bun vite dev",
"build": "bun --bun vite build",
"serve": "bun --bun vite preview"
}
export default defineConfig({
plugins: [
tsconfigPaths(),
tailwindcss(),
tanstackStart(),
nitro({ preset: "bun" }),
viteReact(),
],
});
2. Push to Vercel (Bun runtime).
-
Build fails with “dist directory not found”. If I remove { preset: "bun" }, build succeeds but runtime 500s when Vercel starts the server.
Describe the bug
Summary
I’m running a TanStack React Start app with Vite and Nitro.
This is an app I'm trying to deploy (with my neon db an redis configured):
https://github.com/vdmkotai/tanstack-faster
When I run the Vite scripts via Bun (bun --bun vite dev|build|preview) using plain nitro() in vite config - everything builds but the serverless runtime on Vercel crashes immediately.
If I switch Nitro to nitro({ preset: "bun" }) the Vercel build itself crashes saying it can’t find dist folder
Meanwhile, everything works perfectly on Railway.
Additional context
Additional Context
- Manually switching Vercel’s output folder to
.output didn’t help.
- Railway deployments (Node runtime) work fine with the same code.
Logs
Environment
Environment
^3.0.1-alpha.1, TanStack React Start^1.132.31, Vite^7.0.2<your-deployment-url>[env] VITE_SERVER_URL resolved …(no additional stack trace).Reproduction
Repo configured with:
Scripts
{
"dev": "bun --bun vite dev",
"build": "bun --bun vite build",
"serve": "bun --bun vite preview"
}
export default defineConfig({
plugins: [
tsconfigPaths(),
tailwindcss(),
tanstackStart(),
nitro({ preset: "bun" }),
viteReact(),
],
});
2. Push to Vercel (Bun runtime).
Build fails with “dist directory not found”. If I remove
{ preset: "bun" }, build succeeds but runtime 500s when Vercel starts the server.Describe the bug
Summary
I’m running a TanStack React Start app with Vite and Nitro.
This is an app I'm trying to deploy (with my neon db an redis configured):
https://github.com/vdmkotai/tanstack-faster
When I run the Vite scripts via Bun (
bun --bun vite dev|build|preview) using plainnitro()in vite config - everything builds but the serverless runtime on Vercel crashes immediately.If I switch Nitro to
nitro({ preset: "bun" })the Vercel build itself crashes saying it can’t finddistfolderMeanwhile, everything works perfectly on Railway.
Additional context
Additional Context
.outputdidn’t help.Logs