Static prerendering breaks with Cloudflare plugin
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Start
Describe the bug
Static prerendering breaks with the Cloudflare plugin
Complete minimal reproducer
https://github.com/arackaf/tanstack-blog-blog-post/tree/feature/cloudflare-repro
Steps to Reproduce the Bug
https://github.com/arackaf/tanstack-blog-blog-post/tree/feature/cloudflare-repro
Note the branch: feature/cloudflare-repro
npm i
npm run build
[prerender] Prerendering pages...
[prerender] Concurrency: 16
[prerender] Crawling: /
[prerender] Prerendered 0 pages:
➜ Tunnel closed
➜ Tunnel closed (x2)
file:///Users/arackis/Documents/git/tanstack-blog-blog-post/node_modules/@tanstack/start-plugin-core/dist/esm/prerender.js:81
throw new Error(Failed to fetch ${page.path}: ${res.statusText}, { cause: res });
^
Error: Failed to fetch /: Internal Server Error
at file:///Users/arackis/Documents/git/tanstack-blog-blog-post/node_modules/@tanstack/start-plugin-core/dist/esm/prerender.js:81:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async file:///Users/arackis/Documents/git/tanstack-blog-blog-post/node_modules/@tanstack/start-plugin-core/dist/esm/queue.js:35:12 {
[cause]: Response {}
}
Node.js v24.10.0
Expected behavior
Should work :)
Screenshots or Videos
n/a
Platform
- Router / Start Version: 1.170.8 / 1.168.11
- OS: macOS
- Browser: Chrome
- Browser Version: 148.0.7778.179
- Bundler: Vite
- Bundler Version: 7.1.7
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Clone the linked feature/cloudflare-repro branch and run npm i followed by npm run build. Start with the prerender failure for / and the Cloudflare plugin integration; done means the build completes and static prerendering produces the expected pages without an Internal Server Error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100