cloudflare/vinext

Pages Router prerender: pages under `/api-...` and lazy catchall pages never finish loading

クローズ

#1,542 opened on 2026/05/22

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (384 件のフォーク)github user discovery
adapter-api-e2ehelp wanted

Repository metrics

Stars
 (8,625 個のスター)
PR merge metrics
 (平均マージ 1d 1h) (30d で 462 merged PRs)

説明

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-22).

Problem

Pages whose path begins with /api-docs/... (an apparent false positive of API-route detection) and lazy fallback catch-all pages (fallback: true) hang waiting for the rendered content. The fallback boundary stays on fallback text and never resolves to the page contents.

page.waitForSelector('#api-docs') timeout
TIMED OUT: /Hi.*?delayby3s/

Estimated Impact

~3 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/prerender.test.ts (3 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a Pages Router page at pages/api-docs/index.tsx and a [...slug] lazy catchall. Verify each finishes loading.

  2. Tighten API-route detection. Match only pages/api/... (with the slash), not the substring api-. Otherwise pages whose path starts with api- are treated as API routes and never render.

  3. Resolve the fallback for lazy catchall. Make sure the prerender fallback resolves to the rendered content once getStaticProps completes.


Part of #1328.

コントリビューターガイド