Environment
app.config.ts
import { defineConfig } from '@tanstack/start/config' ;
import tsConfigPaths from 'vite-tsconfig-paths' ;
import { cloudflare } from 'unenv' ;
import nitroCloudflareBindings from 'nitro-cloudflare-dev' ;
export default defineConfig ( {
server : {
preset : 'cloudflare-module' ,
unenv : cloudflare ,
modules : [ nitroCloudflareBindings ] ,
} ,
vite : {
plugins : [
tsConfigPaths ( {
projects : [ './tsconfig.json' ] ,
} ) ,
] ,
} ,
} ) ;
Reproduction
Download the trpc starter: https://github.com/trpc/trpc/tree/main/examples/tanstack-start
Change app.config.ts with the cloudflare-module settings:
import { cloudflare } from 'unenv' ;
import nitroCloudflareBindings from 'nitro-cloudflare-dev' ;
// ...
server : {
preset : 'cloudflare-module' ,
unenv : cloudflare ,
modules : [ nitroCloudflareBindings ] ,
} ,
Describe the bug
go to posts -> select a post -> refresh -> it crashes because of the loader in the $postid route.
Screen.Recording.2025-05-08.at.8.38.09.PM.mov
Additional context
This works when deployed to other platforms like Vercel.
Logs
TRPCClientError: Stream closed
Environment
app.config.ts
Reproduction
Download the trpc starter: https://github.com/trpc/trpc/tree/main/examples/tanstack-start
Change app.config.ts with the
cloudflare-modulesettings:Describe the bug
go to posts -> select a post -> refresh -> it crashes because of the loader in the $postid route.
Screen.Recording.2025-05-08.at.8.38.09.PM.mov
Additional context
This works when deployed to other platforms like Vercel.
Logs