Skip to content

Conversation

@feedthejim
Copy link
Contributor

@feedthejim feedthejim commented Dec 30, 2025

Summary

  • Print "Ready in Xms" immediately when HTTP server starts listening
  • Defer heavy initialization (config, bundler, etc.) to background
  • First request waits for init via existing handlersPromise mechanism
  • Fix shell script symlink resolution for pnpm node_modules/.bin
  • Fix Rust CLI canonicalize for symlink resolution

Test Fixes

Early ready prints "Ready" before initialization completes, so tests that expect errors/behavior at startup need adjustment:

  • invalid-custom-routes/test/index.test.ts - Add killApp cleanup between tests, make a request to trigger lazy route validation, wait for stderr to be populated
  • isolated-dev-build/isolated-dev-build.test.ts - Make a request before checking for .next/dev directory (created during lazy init)
  • isolated-dev-build/next.config.js - Restore experimental.isolatedDevBuild: true config

Test Plan

  • Run benchmark script to verify improvements
  • Build passes
  • Dev server shows "Ready" and handles requests correctly
  • First request waits for full initialization
  • Tests properly trigger lazy initialization before assertions

Copy link
Contributor Author

feedthejim commented Dec 30, 2025

@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 28a223c

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@feedthejim feedthejim force-pushed the perf-dev-early-ready branch 2 times, most recently from 5b2a7f2 to e66e783 Compare December 30, 2025 14:07
@feedthejim feedthejim force-pushed the perf-dev-rust-cli branch 2 times, most recently from 5541176 to e359b2b Compare December 30, 2025 14:11
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch 2 times, most recently from a171bf5 to 619e232 Compare December 30, 2025 14:33
@feedthejim feedthejim changed the base branch from perf-dev-rust-cli to graphite-base/87942 December 30, 2025 14:49
@feedthejim feedthejim changed the base branch from graphite-base/87942 to perf-dev-rust-cli December 30, 2025 14:56
@feedthejim feedthejim force-pushed the perf-dev-rust-cli branch 2 times, most recently from 5ac9f6c to 8c03255 Compare January 3, 2026 10:07
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 79535dc to 60bd937 Compare January 3, 2026 10:07
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 60bd937 to bbcdc88 Compare January 3, 2026 10:14
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from bbcdc88 to c69e0e7 Compare January 4, 2026 19:10
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from c69e0e7 to 17d6681 Compare January 4, 2026 19:26
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 17d6681 to 8ea4b60 Compare January 4, 2026 20:12
@feedthejim feedthejim force-pushed the perf-dev-rust-cli branch 2 times, most recently from 40bb559 to 64e7286 Compare January 4, 2026 22:10
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch 2 times, most recently from b23581c to 3b42b5d Compare January 5, 2026 08:25
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 3b42b5d to 225338f Compare January 5, 2026 08:28
@feedthejim feedthejim force-pushed the perf-dev-rust-cli branch 2 times, most recently from 43a73eb to c928af3 Compare January 5, 2026 08:29
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 225338f to 36b5197 Compare January 5, 2026 08:29
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 36b5197 to 55fcaf0 Compare January 5, 2026 08:34
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 55fcaf0 to 6939d24 Compare January 5, 2026 08:39
@feedthejim feedthejim force-pushed the perf-dev-early-ready branch from 6939d24 to 45a0964 Compare January 5, 2026 08:58
- Print "Ready in Xms" immediately when HTTP server starts listening
- Defer heavy initialization (config, bundler, etc.) to background
- First request waits for init via existing handlersPromise mechanism
- Fix shell script symlink resolution for pnpm node_modules/.bin
- Fix Rust CLI canonicalize for symlink resolution
- Extract getSupportedBrowsers to lightweight module

This reduces perceived startup time from ~300ms to ~50-100ms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@nextjs-bot
Copy link
Collaborator

❌ 120 failing tests in 31 jobs

Updated 2026-01-05 10:08:21 UTC · Commit: f7a9ed2

File Failures Category
test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts 3 cache components dev, turbopack dev, dev
test/development/app-dir/server-navigation-error/server-navigation-error.test.ts 6 cache components dev, turbopack dev
test/development/app-dir/typed-env/typed-env-prod.test.ts 2 dev, turbopack dev
test/development/jsconfig-path-reloading/index.test.ts 4 dev
test/development/middleware-errors/index.test.ts 5 dev, turbopack dev
test/development/tsconfig-path-reloading/index.test.ts 4 dev
test/e2e/app-dir/cache-components-errors/cache-components-console-patch.test.ts 1 turbopack dev
test/e2e/app-dir/cache-components-errors/cache-components-dev-cache-bypass.test.ts 4 turbopack production, dev, prod, turbopack dev
test/e2e/app-dir/cache-components-errors/cache-components-errors.test.ts 6 turbopack production, prod
test/e2e/app-dir/disable-logging-route/disable-logging-route.test.ts 1 dev
test/e2e/app-dir/proxy-with-middleware/proxy-with-middleware.test.ts 2 dev, cache components dev
test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts 1 turbopack dev
test/e2e/app-dir/use-cache-unknown-cache-kind/use-cache-unknown-cache-kind.test.ts 1 cache components dev
test/integration/cli/test/index.test.ts 9 turbopack production integration, turbopack development integration, integration
test/integration/edge-runtime-dynamic-code/test/index.test.ts 6 turbopack development integration
test/integration/edge-runtime-with-node.js-apis/test/index.test.ts 38 integration
test/integration/server-side-dev-errors/test/index.test.ts 27 integration, turbopack development integration, turbopack production integration

Details

📁 test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts — 3 failures
app-dir - devtool-copy-button > should has inspect url copy button · cache components dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts -t "should has inspect url copy button"
page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('[data-nextjs-data-runtime-error-copy-devtools-url]') to be visible

    at waitForSelector (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:521:29)

    at Playwright._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:651:23)
    at Playwright._chain [as startChain] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:632:17)
    at Playwright.startChain [as waitForElementByCss] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:520:17)
    at Playwright.waitForElementByCss [as elementByCss] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:405:17)
    at Object.elementByCss (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts:16:10)

    at Proxy._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:651:23)
    at Proxy._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:627:17)
    at Proxy.continueChain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:455:17)
    at Object.getAttribute (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts:17:10)
app-dir - devtool-copy-button > should has inspect url copy button · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts -t "should has inspect url copy button"
page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('[data-nextjs-data-runtime-error-copy-devtools-url]') to be visible

    at waitForSelector (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:521:29)

    at Playwright._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:651:23)
    at Playwright._chain [as startChain] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:632:17)
    at Playwright.startChain [as waitForElementByCss] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:520:17)
    at Playwright.waitForElementByCss [as elementByCss] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:405:17)
    at Object.elementByCss (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts:16:10)

    at Proxy._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:651:23)
    at Proxy._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:627:17)
    at Proxy.continueChain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:455:17)
    at Object.getAttribute (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts:17:10)
app-dir - devtool-copy-button > should has inspect url copy button · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts -t "should has inspect url copy button"
page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('[data-nextjs-data-runtime-error-copy-devtools-url]') to be visible

    at waitForSelector (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:521:29)

    at Playwright._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:651:23)
    at Playwright._chain [as startChain] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:632:17)
    at Playwright.startChain [as waitForElementByCss] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:520:17)
    at Playwright.waitForElementByCss [as elementByCss] (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:405:17)
    at Object.elementByCss (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts:16:10)

    at Proxy._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:651:23)
    at Proxy._chain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:627:17)
    at Proxy.continueChain (/root/actions-runner/_work/next.js/next.js/test/lib/browsers/playwright.ts:455:17)
    at Object.getAttribute (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/devtool-copy-button/devtool-copy-button.test.ts:17:10)
📁 test/development/app-dir/server-navigation-error/server-navigation-error.test.ts — 6 failures
server-navigation-error > pages router > should error on navigation API redirect · cache components dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/app-dir/server-navigation-error/server-navigation-error.test.ts -t "should error on navigation API redirect"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `server-navigation-error pages router should error on navigation API redirect 1`

- Snapshot  - 4
+ Received  + 2

  {
    "description": "Next.js navigation API is not allowed to be used in Pages Router.",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "pages/pages/redirect.tsx (4:11) @ Page
- > 4 |   redirect('/')
-     |           ^",
+   "source": null,
    "stack": [
-     "Page pages/pages/redirect.tsx (4:11)",
+     "Page ./pages/redirect.tsx",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/server-navigation-error/server-navigation-error.test.ts:12:29)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
server-navigation-error > pages router > should error on navigation API notFound · cache components dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/app-dir/server-navigation-error/server-navigation-error.test.ts -t "should error on navigation API notFound"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `server-navigation-error pages router should error on navigation API notFound 1`

- Snapshot  - 4
+ Received  + 2

  {
    "description": "Next.js navigation API is not allowed to be used in Pages Router.",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "pages/pages/not-found.tsx (4:11) @ Page
- > 4 |   notFound()
-     |           ^",
+   "source": null,
    "stack": [
-     "Page pages/pages/not-found.tsx (4:11)",
+     "Page ./pages/not-found.tsx",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/server-navigation-error/server-navigation-error.test.ts:30:29)
server-navigation-error > pages router > should error on navigation API redirect · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/app-dir/server-navigation-error/server-navigation-error.test.ts -t "should error on navigation API redirect"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `server-navigation-error pages router should error on navigation API redirect 1`

- Snapshot  - 2
+ Received  + 2

  {
    "description": "Next.js navigation API is not allowed to be used in Pages Router.",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "pages/pages/redirect.tsx (4:11) @ Page
+   "source": "pages/redirect.tsx (4:11) @ Page
  > 4 |   redirect('/')
      |           ^",
    "stack": [
-     "Page pages/pages/redirect.tsx (4:11)",
+     "Page pages/redirect.tsx (4:11)",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/server-navigation-error/server-navigation-error.test.ts:12:29)
server-navigation-error > pages router > should error on navigation API notFound · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/app-dir/server-navigation-error/server-navigation-error.test.ts -t "should error on navigation API notFound"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `server-navigation-error pages router should error on navigation API notFound 1`

- Snapshot  - 2
+ Received  + 2

  {
    "description": "Next.js navigation API is not allowed to be used in Pages Router.",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "pages/pages/not-found.tsx (4:11) @ Page
+   "source": "pages/not-found.tsx (4:11) @ Page
  > 4 |   notFound()
      |           ^",
    "stack": [
-     "Page pages/pages/not-found.tsx (4:11)",
+     "Page pages/not-found.tsx (4:11)",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/server-navigation-error/server-navigation-error.test.ts:30:29)
server-navigation-error > middleware > should error on navigation API redirect · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/app-dir/server-navigation-error/server-navigation-error.test.ts -t "should error on navigation API redirect "
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `server-navigation-error middleware should error on navigation API redirect  1`

- Snapshot  - 4
+ Received  + 8

  {
    "description": "Next.js navigation API is not allowed to be used in Middleware.",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "middleware.ts (8:13) @ middleware
- >  8 |     redirect('/')
-      |             ^",
+   "source": null,
    "stack": [
-     "middleware middleware.ts (8:13)",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/server-navigation-error/server-navigation-error.test.ts:52:29)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
server-navigation-error > middleware > should error on navigation API not-found · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/app-dir/server-navigation-error/server-navigation-error.test.ts -t "should error on navigation API not-found"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `server-navigation-error middleware should error on navigation API not-found 1`

- Snapshot  - 4
+ Received  + 7

  {
    "description": "Next.js navigation API is not allowed to be used in Middleware.",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "middleware.ts (6:13) @ middleware
- > 6 |     notFound()
-     |             ^",
+   "source": null,
    "stack": [
-     "middleware middleware.ts (6:13)",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/server-navigation-error/server-navigation-error.test.ts:70:29)
📁 test/development/app-dir/typed-env/typed-env-prod.test.ts — 2 failures
typed-env > should have env types from next config · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/app-dir/typed-env/typed-env-prod.test.ts -t "should have env types from next config"
Error: expect(received).not.toContain(expected) // indexOf

Expected substring: not "FROM_ENV_DEV"
Received string:        "// Type definitions for Next.js environment variables
declare global {
  namespace NodeJS {
    interface ProcessEnv {
      /** Loaded from `.env.development.local` */
      FROM_ENV_DEV_LOCAL?: string
      /** Loaded from `.env.local` */
      FROM_ENV_LOCAL?: string
      /** Loaded from `.env.development` */
      FROM_ENV_DEV?: string
      /** Loaded from `.env` */
      FROM_ENV?: string
      /** Loaded from `next.config.js` */
      FROM_NEXT_CONFIG?: string
    }
  }
}
export {}"
    at toContain (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/typed-env/typed-env-prod.test.ts:17:26)
    at retry (/root/actions-runner/_work/next.js/next.js/test/lib/next-test-utils.ts:797:14)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/typed-env/typed-env-prod.test.ts:13:5)
typed-env > should have env types from next config · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/app-dir/typed-env/typed-env-prod.test.ts -t "should have env types from next config"
Error: expect(received).not.toContain(expected) // indexOf

Expected substring: not "FROM_ENV_DEV"
Received string:        "// Type definitions for Next.js environment variables
declare global {
  namespace NodeJS {
    interface ProcessEnv {
      /** Loaded from `.env.development.local` */
      FROM_ENV_DEV_LOCAL?: string
      /** Loaded from `.env.local` */
      FROM_ENV_LOCAL?: string
      /** Loaded from `.env.development` */
      FROM_ENV_DEV?: string
      /** Loaded from `.env` */
      FROM_ENV?: string
      /** Loaded from `next.config.js` */
      FROM_NEXT_CONFIG?: string
    }
  }
}
export {}"
    at toContain (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/typed-env/typed-env-prod.test.ts:17:26)
    at retry (/root/actions-runner/_work/next.js/next.js/test/lib/next-test-utils.ts:797:14)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/app-dir/typed-env/typed-env-prod.test.ts:13:5)
📁 test/development/jsconfig-path-reloading/index.test.ts — 4 failures
jsconfig-path-reloading > jsconfig > should recover from module not found when paths is updated · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/jsconfig-path-reloading/index.test.ts -t "should recover from module not found when paths is updated"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@lib/second-data'
description: Module not found: Can't resolve '@lib/second-data'
source: ./pages/index.js (1:1)
Module not found: Can't resolve '@lib/second-data'
> 1 | import {secondData} from "@lib/second-data"
    | ^
  2 | import { Button1 } from '@c/button-1'
  3 | import { Button2 } from '@mybutton'
  4 | import { firstData } from '@lib/first-data'

https://nextjs.org/docs/messages/module-not-found
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/jsconfig-path-reloading/index.test.ts:106:9)
jsconfig-path-reloading > jsconfig > should automatically fast refresh content when path is added without error · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/jsconfig-path-reloading/index.test.ts -t "should automatically fast refresh content when path is added without error"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@myotherbutton'
description: Module not found: Can't resolve '@myotherbutton'
source: ./pages/index.js (2:1)
Module not found: Can't resolve '@myotherbutton'
  1 | import { Button1 } from '@c/button-1'
> 2 | import { Button2 } from '@myotherbutton'
    | ^
  3 | import { firstData } from '@lib/first-data'
  4 |
  5 | export default function Page(props) {

https://nextjs.org/docs/messages/module-not-found
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/jsconfig-path-reloading/index.test.ts:161:9)
jsconfig-path-reloading > jsconfig added after starting dev > should recover from module not found when paths is updated · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/jsconfig-path-reloading/index.test.ts -t "should recover from module not found when paths is updated"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@lib/second-data'
description: Module not found: Can't resolve '@lib/second-data'
source: ./pages/index.js (1:1)
Module not found: Can't resolve '@lib/second-data'
> 1 | import {secondData} from "@lib/second-data"
    | ^
  2 | import { Button1 } from '@c/button-1'
  3 | import { Button2 } from '@mybutton'
  4 | import { firstData } from '@lib/first-data'

https://nextjs.org/docs/messages/module-not-found
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/jsconfig-path-reloading/index.test.ts:106:9)
jsconfig-path-reloading > jsconfig added after starting dev > should automatically fast refresh content when path is added without error · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/jsconfig-path-reloading/index.test.ts -t "should automatically fast refresh content when path is added without error"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@myotherbutton'
description: Module not found: Can't resolve '@myotherbutton'
source: ./pages/index.js (2:1)
Module not found: Can't resolve '@myotherbutton'
  1 | import { Button1 } from '@c/button-1'
> 2 | import { Button2 } from '@myotherbutton'
    | ^
  3 | import { firstData } from '@lib/first-data'
  4 |
  5 | export default function Page(props) {

https://nextjs.org/docs/messages/module-not-found
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/jsconfig-path-reloading/index.test.ts:161:9)
📁 test/development/middleware-errors/index.test.ts — 5 failures
middleware - development errors > when throwing while loading the module > logs the error correctly · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/middleware-errors/index.test.ts -t "logs the error correctly"
Error: expect(received).toContain(expected) // indexOf

Expected substring: "
⨯ Error: booooom!
    at <unknown> (middleware.js:3)
    at eval (middleware.js:3:13)
    at (middleware)/./middleware.js (.next/dev/server/middleware.js:18:1)
    at __webpack_require__ "
Received string:    "▲ Next.js 16.1.1-canary.12 (webpack)
- Local:         http://localhost:41193
- Network:       http://65.21.220.145:41193
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)·
✓ Ready in 115ms
⚠ The \"middleware\" file convention is deprecated. Please use \"proxy\" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
⨯ Error: booooom!
    at <unknown> (middleware.js:3)
    at eval (middleware.js:3:13)
    at <unknown> (middleware)/./middleware.js (.next/dev/server/middleware.js:18:1)
    at __webpack_require__ (.next/dev/server/edge-runtime-webpack.js:37:33)
    at fn (.next/dev/server/edge-runtime-webpack.js:273:21)
    at __webpack_require__ (.next/dev/server/edge-runtime-webpack.js:37:33)
    at __webpack_exec__ (.next/dev/server/middleware.js:1043:48)
    at <unknown> (.next/dev/server/middleware.js:1044:37)
    at webpackJsonpCallback (.next/dev/server/edge-runtime-webpack.js:1128:39)
  1 |
  2 |       import { NextResponse } from 'next/server'
> 3 |       throw new Error('booooom!')
    |             ^
  4 |       export default function () {
  5 |         return NextResponse.next()
  6 |       }
"
    at Object.toContain (/root/actions-runner/_work/next.js/next.js/test/development/middleware-errors/index.test.ts:304:41)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
middleware - development errors > when throwing while loading the module > renders the error correctly and recovers · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/middleware-errors/index.test.ts -t "renders the error correctly and recovers"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `middleware - development errors when throwing while loading the module renders the error correctly and recovers 1`

- Snapshot  - 1
+ Received  + 0

@@ -13,8 +13,7 @@
      "<FIXME-next-dist-dir>",
      "<FIXME-next-dist-dir>",
      "<FIXME-next-dist-dir>",
      "<FIXME-next-dist-dir>",
      "<FIXME-next-dist-dir>",
-     "<FIXME-next-dist-dir>",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/middleware-errors/index.test.ts:366:31)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
middleware - development errors > when middleware throws synchronously > renders the error correctly and recovers · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/middleware-errors/index.test.ts -t "renders the error correctly and recovers"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `middleware - development errors when middleware throws synchronously renders the error correctly and recovers 1`

- Snapshot  - 4
+ Received  + 6

  {
    "description": "boom",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "middleware.js (3:15) @ {default export}
- > 3 |         throw new Error('boom')
-     |               ^",
+   "source": null,
    "stack": [
-     "{default export} middleware.js (3:15)",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/middleware-errors/index.test.ts:59:31)
middleware - development errors > when running invalid dynamic code with eval > renders the error correctly and recovers · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/middleware-errors/index.test.ts -t "renders the error correctly and recovers"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `middleware - development errors when running invalid dynamic code with eval renders the error correctly and recovers 1`

- Snapshot  - 6
+ Received  + 8

  {
    "description": "test is not defined",
    "environmentLabel": null,
    "label": "Runtime ReferenceError",
-   "source": "middleware.js (4:9) @ eval
- > 4 |         eval('test')
-     |         ^",
+   "source": null,
    "stack": [
-     "eval middleware.js (4:9)",
-     "<unknown> middleware.js (4:9)",
-     "{default export} middleware.js (3:22)",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/middleware-errors/index.test.ts:225:31)
middleware - development errors > when throwing while loading the module > renders the error correctly and recovers · turbopack dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev-turbo test/development/middleware-errors/index.test.ts -t "renders the error correctly and recovers"
Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `middleware - development errors when throwing while loading the module renders the error correctly and recovers 1`

- Snapshot  -  4
+ Received  + 11

  {
    "description": "booooom!",
    "environmentLabel": null,
    "label": "Runtime Error",
-   "source": "middleware.js (3:13) @ module evaluation
- > 3 |       throw new Error('booooom!')
-     |             ^",
+   "source": null,
    "stack": [
-     "module evaluation middleware.js (3:13)",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
+     "<FIXME-next-dist-dir>",
    ],
  }
    at Object.toDisplayRedbox (/root/actions-runner/_work/next.js/next.js/test/development/middleware-errors/index.test.ts:329:31)
📁 test/development/tsconfig-path-reloading/index.test.ts — 4 failures
tsconfig-path-reloading > tsconfig > should recover from module not found when paths is updated · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/tsconfig-path-reloading/index.test.ts -t "should recover from module not found when paths is updated"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@lib/second-data'
description: Module not found: Can't resolve '@lib/second-data'
source: ./pages/index.tsx (1:1)
Module not found: Can't resolve '@lib/second-data'
> 1 | import {secondData} from "@lib/second-data"
    | ^
  2 | import { Button1 } from '@c/button-1'
  3 | import { Button2 } from '@mybutton'
  4 | import { firstData } from '@lib/first-data'

https://nextjs.org/docs/messages/module-not-found
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/tsconfig-path-reloading/index.test.ts:106:9)
tsconfig-path-reloading > tsconfig > should automatically fast refresh content when path is added without error · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/tsconfig-path-reloading/index.test.ts -t "should automatically fast refresh content when path is added without error"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@myotherbutton'
description: Module not found: Can't resolve '@myotherbutton'
source: ./pages/index.tsx (2:1)
Module not found: Can't resolve '@myotherbutton'
  1 | import { Button1 } from '@c/button-1'
> 2 | import { Button2 } from '@myotherbutton'
    | ^
  3 | import { firstData } from '@lib/first-data'
  4 |
  5 | export default function Page(props) {

https://nextjs.org/docs/messages/module-not-found
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/tsconfig-path-reloading/index.test.ts:161:9)
tsconfig-path-reloading > tsconfig added after starting dev > should recover from module not found when paths is updated · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/tsconfig-path-reloading/index.test.ts -t "should recover from module not found when paths is updated"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@lib/second-data'
description: Module not found: Can't resolve '@lib/second-data'
source: ./pages/index.tsx (1:1)
Module not found: Can't resolve '@lib/second-data'
> 1 | import {secondData} from "@lib/second-data"
    | ^
  2 | import { Button1 } from '@c/button-1'
  3 | import { Button2 } from '@mybutton'
  4 | import { firstData } from '@lib/first-data'

https://nextjs.org/docs/messages/module-not-found
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/tsconfig-path-reloading/index.test.ts:106:9)
tsconfig-path-reloading > tsconfig added after starting dev > should automatically fast refresh content when path is added without error · dev

Datadog Job · 7-day History · CI Logs

pnpm test-dev test/development/tsconfig-path-reloading/index.test.ts -t "should automatically fast refresh content when path is added without error"
Error: Expected no visible Redbox but found one
header: Build Error
Module not found: Can't resolve '@myotherbutton'
description: Module not found: Can't resolve '@myotherbutton'
source: ./pages/index.tsx (2:1)
Module not found: Can't resolve '@myotherbutton'
  1 | import { Button1 } from '@c/button-1'
> 2 | import { Button2 } from '@myotherbutton'
    | ^
  3 | import { firstData } from '@lib/first-data'
  4 |
  5 | export default function Page(props) {

https://nextjs.org/docs/messages/module-not-found
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:449:9)
    at process.callbackTrampoline (node:internal/async_hooks:130:17)
    at Object.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/development/tsconfig-path-reloading/index.test.ts:161:9)

⚠️ 96 more failures (details omitted due to size limit)

...mponents-errors/cache-components-dev-cache-bypass.test.ts (4)

Cache Components Errors > Warning for Bypassing Caches in Dev > does not warn if you render with cache-control: no-cache in dev on initial page load

  • turbopack production · DD
  • prod · DD

Cache Components Errors > Warning for Bypassing Caches in Dev > warns if you render with cache-control: no-cache in dev on initial page load

  • dev · DD
  • turbopack dev · DD
...r/cache-components-errors/cache-components-errors.test.ts (6)

Cache Components Errors > Build With --prerender-debug > Inside use cache > throwing an error at runtime > should log an error at runtime

  • turbopack production · DD
  • prod · DD

Cache Components Errors > Build With --prerender-debug > Inside use cache > catching an error at runtime > should log an error at runtime

  • turbopack production · DD
  • prod · DD

Cache Components Errors > Build Without --prerender-debug > Inside use cache > throwing an error at runtime > should log an error at runtime

  • turbopack production · DD

Cache Components Errors > Build Without --prerender-debug > Inside use cache > catching an error at runtime > should log an error at runtime

  • turbopack production · DD
...p-dir/disable-logging-route/disable-logging-route.test.ts (1)

app-dir - disable-logging-route > should not log if disabled logging

  • dev · DD
...p-dir/proxy-with-middleware/proxy-with-middleware.test.ts (2)

proxy-with-middleware > should error when both middleware and proxy files are detected

  • dev · DD
  • cache components dev · DD
...dir/typed-routes-validator/typed-routes-validator.test.ts (1)

typed-routes-validator > should generate route validation correctly

  • turbopack dev · DD
...e-unknown-cache-kind/use-cache-unknown-cache-kind.test.ts (1)

use-cache-unknown-cache-kind > should recover from the build error if the cache handler is defined

  • cache components dev · DD
test/integration/cli/test/index.test.ts (9)

CLI Usage > dev > --inspect

  • turbopack production integration · DD
  • turbopack development integration · DD
  • integration · DD

CLI Usage > dev > --inspect 0

  • turbopack production integration · DD
  • turbopack development integration · DD
  • integration · DD

CLI Usage > dev > --inspect [port]

  • turbopack production integration · DD
  • turbopack development integration · DD
  • integration · DD
.../integration/edge-runtime-dynamic-code/test/index.test.ts (6)

Middleware usage of dynamic code evaluation > development mode > shows a warning when running code with eval

  • turbopack development integration · DD

Middleware usage of dynamic code evaluation > development mode > shows a warning when running WebAssembly.compile

  • turbopack development integration · DD

Middleware usage of dynamic code evaluation > development mode > shows a warning when running WebAssembly.instantiate with a buffer parameter

  • turbopack development integration · DD

Edge route usage of dynamic code evaluation > development mode > shows a warning when running code with eval

  • turbopack development integration · DD

Edge route usage of dynamic code evaluation > development mode > shows a warning when running WebAssembly.compile

  • turbopack development integration · DD

Edge route usage of dynamic code evaluation > development mode > shows a warning when running WebAssembly.instantiate with a buffer parameter

  • turbopack development integration · DD
...gration/edge-runtime-with-node.js-apis/test/index.test.ts (38)

Middleware using Node.js API > development mode > throws error when using setImmediate

  • integration · DD

Middleware using Node.js API > development mode > throws error when using clearImmediate

  • integration · DD

Middleware using Node.js API > development mode > throws error when using process.cwd

  • integration · DD

Middleware using Node.js API > development mode > throws error when using process.cpuUsage

  • integration · DD

Middleware using Node.js API > development mode > throws error when using process.getuid

  • integration · DD

Middleware using Node.js API > development mode > throws error when using BroadcastChannel

  • integration · DD

Middleware using Node.js API > development mode > throws error when using ByteLengthQueuingStrategy

  • integration · DD

Middleware using Node.js API > development mode > throws error when using CompressionStream

  • integration · DD

Middleware using Node.js API > development mode > throws error when using CountQueuingStrategy

  • integration · DD

Middleware using Node.js API > development mode > throws error when using DecompressionStream

  • integration · DD

Middleware using Node.js API > development mode > throws error when using DomException

  • integration · DD

Middleware using Node.js API > development mode > throws error when using MessageChannel

  • integration · DD

Middleware using Node.js API > development mode > throws error when using MessageEvent

  • integration · DD

Middleware using Node.js API > development mode > throws error when using MessagePort

  • integration · DD

Middleware using Node.js API > development mode > throws error when using ReadableByteStreamController

  • integration · DD

Middleware using Node.js API > development mode > throws error when using ReadableStreamBYOBRequest

  • integration · DD

Middleware using Node.js API > development mode > throws error when using ReadableStreamDefaultController

  • integration · DD

Middleware using Node.js API > development mode > throws error when using TransformStreamDefaultController

  • integration · DD

Middleware using Node.js API > development mode > throws error when using WritableStreamDefaultController

  • integration · DD

Edge route using Node.js API > development mode > throws error when using setImmediate

  • integration · DD

Edge route using Node.js API > development mode > throws error when using clearImmediate

  • integration · DD

Edge route using Node.js API > development mode > throws error when using process.cwd

  • integration · DD

Edge route using Node.js API > development mode > throws error when using process.cpuUsage

  • integration · DD

Edge route using Node.js API > development mode > throws error when using process.getuid

  • integration · DD

Edge route using Node.js API > development mode > throws error when using BroadcastChannel

  • integration · DD

Edge route using Node.js API > development mode > throws error when using ByteLengthQueuingStrategy

  • integration · DD

Edge route using Node.js API > development mode > throws error when using CompressionStream

  • integration · DD

Edge route using Node.js API > development mode > throws error when using CountQueuingStrategy

  • integration · DD

Edge route using Node.js API > development mode > throws error when using DecompressionStream

  • integration · DD

Edge route using Node.js API > development mode > throws error when using DomException

  • integration · DD

Edge route using Node.js API > development mode > throws error when using MessageChannel

  • integration · DD

Edge route using Node.js API > development mode > throws error when using MessageEvent

  • integration · DD

Edge route using Node.js API > development mode > throws error when using MessagePort

  • integration · DD

Edge route using Node.js API > development mode > throws error when using ReadableByteStreamController

  • integration · DD

Edge route using Node.js API > development mode > throws error when using ReadableStreamBYOBRequest

  • integration · DD

Edge route using Node.js API > development mode > throws error when using ReadableStreamDefaultController

  • integration · DD

Edge route using Node.js API > development mode > throws error when using TransformStreamDefaultController

  • integration · DD

Edge route using Node.js API > development mode > throws error when using WritableStreamDefaultController

  • integration · DD
test/integration/server-side-dev-errors/test/index.test.ts (27)

server-side dev errors > should show server-side error for gsp page correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for gssp page correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for dynamic gssp page correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for api route correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for dynamic api route correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for uncaught rejection correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for uncaught empty rejection correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for uncaught exception correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

server-side dev errors > should show server-side error for uncaught empty exception correctly

  • integration · DD
  • turbopack development integration · DD
  • turbopack production integration · DD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. tests Turbopack Related to Turbopack with Next.js. type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants