react-router
react-router copied to clipboard
Cloudflare RSC in data mode erroring during dev
Cloudflare RSC in data mode erroring during dev
What I found is that the request for http://localhost:5173/__vite_rsc_load_module_dev_proxy?environmentName=ssr&entryName=index
Errors with this error:
Error: Stream ended before root value was parsed
at file:///....../react-router/node_modules/turbo-stream/dist/turbo-stream.mjs:808:19
at <anonymous>
Reproduction
https://github.com/ivogt/rr-cloudflare-rsc-failing
Based on Hi-Ogawa's https://github.com/vitejs/vite-plugin-react/tree/08-31-feat_rsc_react-router_cloudflare_single_worker_example
System Info
System:
OS: macOS 26.0.1
CPU: (8) arm64 Apple M1 Pro
Memory: 2.06 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.18.0 - /Users/ivotodorov/.nvm/versions/node/v22.18.0/bin/node
Yarn: 1.22.22 - /Users/ivotodorov/.nvm/versions/node/v22.18.0/bin/yarn
npm: 10.9.3 - /Users/ivotodorov/.nvm/versions/node/v22.18.0/bin/npm
pnpm: 10.12.1 - /Users/ivotodorov/Library/pnpm/pnpm
bun: 1.2.21 - /Users/ivotodorov/.bun/bin/bun
Browsers:
Chrome: 141.0.7390.123
Edge: 141.0.3537.99
Safari: 26.0.1
npmPackages:
react-router: ^7.9.4 => 7.9.4
vite: ^7.1.10 => 7.1.10
Used Package Manager
yarn
Expected Behavior
Starting vite should work during dev
Actual Behavior
Starting dev errors on first request but works if compiled.