Skip to content

Prerendering appears broken in latest #6322

@arackaf

Description

@arackaf

Which project does this relate to?

Start

Describe the bug

Prerendering appears broken in latest version of start. Repro can be found in this repo (note the branch name - feature/prerender-repro):

https://github.com/arackaf/tanstack-blog-blog-post/tree/feature/prerender-repro

With the CloudFlare plugin, the error looks like this

[prerender] Prerendering pages...
[prerender] Concurrency: 16
[prerender] Crawling: /
[prerender] Prerendered 0 pages:
file:///Users/arackis/Documents/git/tanstack-blog-blog-post/node_modules/@tanstack/start-plugin-core/dist/esm/prerender.js:126
            throw new Error(`Failed to fetch ${page.path}: ${res.statusText}`, {
                  ^

Error: Failed to fetch /: Not Found
    at file:///Users/arackis/Documents/git/tanstack-blog-blog-post/node_modules/@tanstack/start-plugin-core/dist/esm/prerender.js:126:19
    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:38:17 {
  [cause]: Response {}
}

Node.js v24.10.0

With the nitro plugin, the error looks like this (both are imported into the vite config - you can comment either one in or out)

[prerender] Concurrency: 16
[prerender] Crawling: /
[prerender] Prerendered 0 pages:
file:///Users/arackis/Documents/git/tanstack-blog-blog-post/node_modules/@tanstack/start-plugin-core/dist/esm/prerender.js:126
            throw new Error(`Failed to fetch ${page.path}: ${res.statusText}`, {
                  ^

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:126:19
    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:38:17 {
  [cause]: Response {}
}

Node.js v24.10.0
➜ Listening on: http://localhost:59432/ (all interfaces)

In either case, everything works perfectly once you remove the prerender option from the tanstack plugin

Your Example Website or App

https://github.com/arackaf/tanstack-blog-blog-post/tree/feature/prerender-repro

Steps to Reproduce the Bug or Issue

npm i
npm run build

Expected behavior

Should work

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions