Skip to content

Keep pages/404.js to be able to dynamically render it anyway#89263

Merged
mischnic merged 2 commits intocanaryfrom
mischnic/keep-404
Jan 29, 2026
Merged

Keep pages/404.js to be able to dynamically render it anyway#89263
mischnic merged 2 commits intocanaryfrom
mischnic/keep-404

Conversation

@mischnic
Copy link
Copy Markdown
Member

@mischnic mischnic commented Jan 29, 2026

Needed for vercel/vercel#14795

Keep the file so that we can instead dynamically render it as opposed to having to bundle the prerender into the function

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mischnic mischnic changed the title Keep pages/404.js to be able to runtime-render it anyway Keep pages/404.js to be able to dynamically render it anyway Jan 29, 2026
@mischnic mischnic marked this pull request as ready for review January 29, 2026 21:35
@nextjs-bot
Copy link
Copy Markdown
Collaborator

nextjs-bot commented Jan 29, 2026

Failing test suites

Commit: 7639972 | About building and testing Next.js

pnpm test-start test/e2e/streaming-ssr/index.test.ts (job)

  • react 18 streaming SSR in minimal mode with node runtime > should have generated a static 404 page (DD)
Expand output

● react 18 streaming SSR in minimal mode with node runtime › should have generated a static 404 page

ENOENT: no such file or directory, open '/tmp/next-install-da1ab83611dc03317336b1f5ac8fb147dbc9a1f035e21eeac50d7cf0658b6e52/.next/server/pages/404.js'

pnpm test-start test/e2e/app-dir/not-found/basic/index.test.ts (job)

  • app dir - not-found - basic > with default runtime > should create the 404 mapping and copy the file to pages (DD)
Expand output

● app dir - not-found - basic › with default runtime › should create the 404 mapping and copy the file to pages

ENOENT: no such file or directory, open '/tmp/next-install-1cc64c2ccb98a2554d414fe033b515371b59c364fbb530bd0d025711e372d977/.next/server/pages/404.js'

pnpm test-start-turbo test/e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts (turbopack) (job)

  • app dir client cache with parallel routes > prefetch={true} > should re-use the cache for the full page, only for 5 mins (DD)
Expand output

● app dir client cache with parallel routes › prefetch={true} › should re-use the cache for the full page, only for 5 mins

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  54 |     })
  55 |
> 56 |     it('should re-use the cache for the full page, only for 5 mins', async () => {
     |     ^
  57 |       let page: PlaywrightPage
  58 |       const browser = await next.browser('/', {
  59 |         async beforePageLoad(p) {

  at it (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:56:5)
  at describe (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:30:3)
  at Object.describe (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:7:1)

@mischnic mischnic merged commit 0e457e9 into canary Jan 29, 2026
161 checks passed
Copy link
Copy Markdown
Member Author

Merge activity

@mischnic mischnic deleted the mischnic/keep-404 branch January 29, 2026 22:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants