Skip to content
Source
Sign inSign up
TanStack/router

Prerender hangs indefinitely if `prerender.filter` returns zero true results #6425

Closedkompot(GitHub profile, opens in a new tab) opened this issue 1 comment

Which project does this relate to?

Start

Describe the bug

Build hangs if prerender filter function return 0 trues.

Succeedes if at least one true result is returned.

Your Example Website or App

https://github.com/kompot/tanstack-router-prerender-hangs

Steps to Reproduce the Bug or Issue

  1. Clone repo
  2. pnpm install
  3. vite build hangs indefinitely.
  4. Replace https://github.com/kompot/tanstack-router-prerender-hangs/blob/038b8b4331eed5097a2c6c741a7a8c56e6da033f/vite.config.ts#L18 with return route.path === "/blocked" (actually existing page) and build succeedes.

Expected behavior

Build should pass anyway. In case 0 pages are left by filter then it might be some kind of warning that filter function was set but it returned 0 pages and thus nothing was prerendered.

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.153.2]
  • OS: macOS
  • Bundler: vite
  • Bundler Version: 8.0.0 beta 8

Additional context

No response

  1. Even without filter it hangs for me as well, on the following config

        tanstackStart({
          prerender: {
            enabled: true,
            concurrency: 1,
          }
       })

    I've tried different combinations of options but with no success. It just always hangs at the build step.

Sign in to join this conversation.