Skip to content

Conversation

@mischnic
Copy link
Member

@mischnic mischnic commented Jan 22, 2026

  • if you await __turbopack_load_by_url__ , it waits for the exact chunk url you passed in to load
  • but when that chunk actually loads, it registers itself with stripQuery(chunkurl)+CHUNK_SUFFIX

so there was mismatch if you load a chunk from a different deployment and thus await __turbopack_load_by_url__ never resolves


Very confused about what's going on here:

 FAIL   Turbopack  test/e2e/app-dir/segment-cache/deployment-skew/deployment-skew.test.ts (61.629 s)
  segment cache (deployment skew)
    with BUILD_ID
      ✓ does not crash when prefetching a dynamic, non-PPR page on a different deployment (11673 ms)
      ✓ does not crash when prefetching a static page on a different deployment (10744 ms)
    with NEXT_DEPLOYMENT_ID
      ✓ does not crash when prefetching a dynamic, non-PPR page on a different deployment (10924 ms)
      ✕ does not crash when prefetching a static page on a different deployment (15756 ms)

  ● segment cache (deployment skew) › with NEXT_DEPLOYMENT_ID › does not crash when prefetching a static page on a different deployment

    page.waitForSelector: Timeout 5000ms exceeded.
    Call log:
      - waiting for locator('#build-id') to be visible

      519 |
      520 |     return this.startChain(async () => {
    > 521 |       const el = await page.waitForSelector(selector, {
          |                             ^
      522 |         timeout,
      523 |         state,
      524 |       })

      at waitForSelector (lib/browsers/playwright.ts:521:29)
      at Playwright._chain (lib/browsers/playwright.ts:651:23)
      at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
      at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
      at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
      at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
      at Object.elementById (e2e/app-dir/segment-cache/deployment-skew/deployment-skew.test.ts:122:37)

In the browser debugger, this line here in fetchServerResponse never returns, so there is actually no navigation at all (neither SPA nor MPA) when clicking the link, should be doing an MPA nav

const flightResponse = await flightResponsePromise

Copy link
Member Author

mischnic commented Jan 22, 2026

@mischnic mischnic changed the title Cleanup Add test for Jan 22, 2026
@mischnic mischnic changed the title Add test for Add deployment-id test for test/e2e/app-dir/segment-cache/deployment-skew/ Jan 22, 2026
@mischnic mischnic changed the title Add deployment-id test for test/e2e/app-dir/segment-cache/deployment-skew/ Add deployment-id version of test/e2e/app-dir/segment-cache/deployment-skew/ Jan 22, 2026
@mischnic mischnic force-pushed the mischnic/flight-nav-tests branch from 3db6ee3 to 19ad6a7 Compare January 22, 2026 15:13
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 22, 2026

Failing test suites

Commit: 7cfe0f6 | About building and testing Next.js

pnpm test test/integration/edge-runtime-module-errors/test/index.test.ts (turbopack) (job)

  • Edge runtime code with imports > Edge API dynamically importing node.js module in a lib > production mode > throws unsupported module error in production at runtime and prints error on logs (DD)
  • Edge runtime code with imports > Edge API importing vanilla 3rd party module > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Edge API importing vanilla 3rd party module > production mode > does not throw in production at runtime (DD)
  • Edge runtime code with imports > Edge API using Buffer polyfill > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Edge API using Buffer polyfill > production mode > does not throw in production at runtime (DD)
  • Edge runtime code with imports > Middleware dynamically importing node.js module in a lib > production mode > throws unsupported module error in production at runtime and prints error on logs (DD)
  • Edge runtime code with imports > Middleware importing vanilla 3rd party module > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Middleware importing vanilla 3rd party module > production mode > does not throw in production at runtime (DD)
  • Edge runtime code with imports > Middleware using Buffer polyfill > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Middleware using Buffer polyfill > production mode > does not throw in production at runtime (DD)
Expand output

● Edge runtime code with imports › Edge API dynamically importing node.js module in a lib › production mode › throws unsupported module error in production at runtime and prints error on logs

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'os' module"
Received string:    "▲ Next.js 16.2.0-canary.4
- Local:         http://[::1]:34413
- Network:       http://[::]:34413
✓ Ready in 84ms
⨯ TypeError: t[0].getAttribute is not a function
    at <unknown> (../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1)

  at I (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1:7365)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1:9476)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1:9488)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async runWithTaggedErrors (../dist/server/web/sandbox/sandbox.js:86:21)
  at async NextNodeServer.runEdgeFunction (../dist/server/next-server.js:1370:24)
  ⨯ TypeError: t[0].getAttribute is not a function
      at <unknown> (../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1)
  at I (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1:7365)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1:9476)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_fc242834.js:1:9488)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async runWithTaggedErrors (../dist/server/web/sandbox/sandbox.js:86:21)
  at async NextNodeServer.runEdgeFunction (../dist/server/next-server.js:1370:24)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/index.test.ts:212:45)

● Edge runtime code with imports › Middleware dynamically importing node.js module in a lib › production mode › throws unsupported module error in production at runtime and prints error on logs

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'os' module"
Received string:    "▲ Next.js 16.2.0-canary.4
- Local:         http://[::1]:41143
- Network:       http://[::]:41143
✓ Ready in 73ms
TypeError: t[0].getAttribute is not a function
    at <unknown> (../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_47d92185.js:1)

  at I (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_47d92185.js:1:7365)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_47d92185.js:1:9476)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_47d92185.js:1:9488)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async runWithTaggedErrors (../dist/server/web/sandbox/sandbox.js:86:21)
  at async NextNodeServer.runMiddleware (../dist/server/next-server.js:1265:22)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/index.test.ts:212:45)

● Edge runtime code with imports › Edge API importing vanilla 3rd party module › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  324 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  325 |       const res = await fetchViaHTTP(context.appPort, url)
> 326 |       expect(res.status).toBe(200)
      |                          ^
  327 |       expect(res.headers.get('x-from-runtime')).toBeDefined()
  328 |       expectNoError(moduleName)
  329 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:326:26)

● Edge runtime code with imports › Edge API importing vanilla 3rd party module › production mode › does not throw in production at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  342 |           )
  343 |           const res = await fetchViaHTTP(context.appPort, url)
> 344 |           expect(res.status).toBe(200)
      |                              ^
  345 |           expect(res.headers.get('x-from-runtime')).toBeDefined()
  346 |           expectNoError(moduleName)
  347 |         })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:344:30)

● Edge runtime code with imports › Middleware importing vanilla 3rd party module › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  324 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  325 |       const res = await fetchViaHTTP(context.appPort, url)
> 326 |       expect(res.status).toBe(200)
      |                          ^
  327 |       expect(res.headers.get('x-from-runtime')).toBeDefined()
  328 |       expectNoError(moduleName)
  329 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:326:26)

● Edge runtime code with imports › Middleware importing vanilla 3rd party module › production mode › does not throw in production at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  342 |           )
  343 |           const res = await fetchViaHTTP(context.appPort, url)
> 344 |           expect(res.status).toBe(200)
      |                              ^
  345 |           expect(res.headers.get('x-from-runtime')).toBeDefined()
  346 |           expectNoError(moduleName)
  347 |         })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:344:30)

● Edge runtime code with imports › Edge API using Buffer polyfill › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  393 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  394 |       const res = await fetchViaHTTP(context.appPort, url)
> 395 |       expect(res.status).toBe(200)
      |                          ^
  396 |       expect(res.headers.get('x-from-runtime')).toBe('false')
  397 |       expectNoError(moduleName)
  398 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:395:26)

● Edge runtime code with imports › Edge API using Buffer polyfill › production mode › does not throw in production at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  408 |           )
  409 |           const res = await fetchViaHTTP(context.appPort, url)
> 410 |           expect(res.status).toBe(200)
      |                              ^
  411 |           expect(res.headers.get('x-from-runtime')).toBe('false')
  412 |           expectNoError(moduleName)
  413 |         })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:410:30)

● Edge runtime code with imports › Middleware using Buffer polyfill › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  393 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  394 |       const res = await fetchViaHTTP(context.appPort, url)
> 395 |       expect(res.status).toBe(200)
      |                          ^
  396 |       expect(res.headers.get('x-from-runtime')).toBe('false')
  397 |       expectNoError(moduleName)
  398 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:395:26)

● Edge runtime code with imports › Middleware using Buffer polyfill › production mode › does not throw in production at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  408 |           )
  409 |           const res = await fetchViaHTTP(context.appPort, url)
> 410 |           expect(res.status).toBe(200)
      |                              ^
  411 |           expect(res.headers.get('x-from-runtime')).toBe('false')
  412 |           expectNoError(moduleName)
  413 |         })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:410:30)

pnpm test test/integration/middleware-basic/test/index.test.ts (turbopack) (job)

  • Edge runtime configurable guards > Edge API using lib with allowed, used dynamic code > still warns in dev at runtime (DD)
  • Edge runtime configurable guards > Edge API with allowed, used dynamic code > still warns in dev at runtime (DD)
  • Edge runtime configurable guards > Edge API with use of Function as a type > does not warn in dev at runtime (DD)
  • Edge runtime configurable guards > Middleware with allowed, used dynamic code > still warns in dev at runtime (DD)
  • Edge runtime configurable guards > Middleware with use of Function as a type > does not warn in dev at runtime (DD)
  • Edge runtime configurable guards > Multiple functions with different configurations > warns in dev for allowed code (DD)
  • Edge runtime configurable guards > Multiple functions with different configurations > warns in dev for unallowed code (DD)
Expand output

● Edge runtime configurable guards › Multiple functions with different configurations › warns in dev for allowed code

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  90 |       const res = await fetchViaHTTP(context.appPort, middlewareUrl)
  91 |       await waitFor(500)
> 92 |       expect(res.status).toBe(200)
     |                          ^
  93 |       await retry(async () => {
  94 |         expect(context.logs.output).toContain(
  95 |           `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:92:26)

● Edge runtime configurable guards › Multiple functions with different configurations › warns in dev for unallowed code

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  101 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  102 |       const res = await fetchViaHTTP(context.appPort, routeUrl)
> 103 |       expect(res.status).toBe(200)
      |                          ^
  104 |       await retry(async () => {
  105 |         expect(context.logs.output).toContain(
  106 |           `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:103:26)

● Edge runtime configurable guards › Edge API with allowed, used dynamic code › still warns in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  226 |       await waitFor(500)
  227 |       // eslint-disable-next-line jest/no-standalone-expect
> 228 |       expect(res.status).toBe(200)
      |                          ^
  229 |       // eslint-disable-next-line jest/no-standalone-expect
  230 |       expect(context.logs.output).toContain(
  231 |         `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:228:26)

● Edge runtime configurable guards › Middleware with allowed, used dynamic code › still warns in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  226 |       await waitFor(500)
  227 |       // eslint-disable-next-line jest/no-standalone-expect
> 228 |       expect(res.status).toBe(200)
      |                          ^
  229 |       // eslint-disable-next-line jest/no-standalone-expect
  230 |       expect(context.logs.output).toContain(
  231 |         `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:228:26)

● Edge runtime configurable guards › Edge API using lib with allowed, used dynamic code › still warns in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  226 |       await waitFor(500)
  227 |       // eslint-disable-next-line jest/no-standalone-expect
> 228 |       expect(res.status).toBe(200)
      |                          ^
  229 |       // eslint-disable-next-line jest/no-standalone-expect
  230 |       expect(context.logs.output).toContain(
  231 |         `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:228:26)

● Edge runtime configurable guards › Edge API with use of Function as a type › does not warn in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  484 |       const res = await fetchViaHTTP(context.appPort, url)
  485 |       await waitFor(500)
> 486 |       expect(res.status).toBe(200)
      |                          ^
  487 |       expect(context.logs.output).not.toContain(
  488 |         `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`
  489 |       )

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:486:26)

● Edge runtime configurable guards › Middleware with use of Function as a type › does not warn in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  484 |       const res = await fetchViaHTTP(context.appPort, url)
  485 |       await waitFor(500)
> 486 |       expect(res.status).toBe(200)
      |                          ^
  487 |       expect(context.logs.output).not.toContain(
  488 |         `Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime`
  489 |       )

  at Object.toBe (integration/edge-runtime-configurable-guards/test/index.test.ts:486:26)

pnpm test test/integration/edge-runtime-streaming-error/test/index.test.ts (turbopack) (job)

  • Edge runtime code with imports > Edge API importing unused node.js module > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Edge API importing unused node.js module > production mode > does not throw in production at runtime (DD)
  • Edge runtime code with imports > Edge API statically importing node.js module > throws unsupported module error in dev at runtime and highlights the faulty line (DD)
  • Edge runtime code with imports > Edge API statically importing node.js module > production mode > throws unsupported module error in production at runtime and prints error on logs (DD)
  • Edge runtime code with imports > Middleware importing unused node.js module > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Middleware importing unused node.js module > production mode > does not throw in production at runtime (DD)
  • Edge runtime code with imports > Middleware statically importing node.js module > throws unsupported module error in dev at runtime and highlights the faulty line (DD)
  • Edge runtime code with imports > Middleware statically importing node.js module > production mode > throws unsupported module error in production at runtime and prints error on logs (DD)
Expand output

● Edge runtime code with imports › Edge API statically importing node.js module › throws unsupported module error in dev at runtime and highlights the faulty line

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'fs' module"
Received string:    "▲ Next.js 16.2.0-canary.4 (Turbopack)
- Local:         http://[::1]:41849
- Network:       http://[::]:41849
✓ Ready in 194ms
Creating turbopack project {
  dir: '/root/actions-runner/_work/next.js/next.js/test/integration/edge-runtime-module-errors',
  testMode: true
}
⚠ The \"middleware\" file convention is deprecated. Please use \"proxy\" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)·
⨯ Error [TypeError]: registration[0].getAttribute is not a function
    at ignore-listed frames
⨯ Error [TypeError]: registration[0].getAttribute is not a function
    at ignore-listed frames
⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
Ecmascript file had an error
  1 |
> 2 |           import { basename } from \"fs\"
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  3 |
  4 |           export default async function handler(request) {
  5 |             basename()·
A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
 GET /api/route 500 in 651ms (compile: 596ms, render: 55ms)
⨯ Error [TypeError]: registration[0].getAttribute is not a function

  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
  Ecmascript file had an error
    1 |
  > 2 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 |
    4 |           export default async function handler(request) {
    5 |             basename()·
  A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 32ms (compile: 28ms, render: 4ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
  Ecmascript file had an error
    1 |
  > 2 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 |
    4 |           export default async function handler(request) {
    5 |             basename()·
  A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 25ms (compile: 22ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
  Ecmascript file had an error
    1 |
  > 2 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 |
    4 |           export default async function handler(request) {
    5 |             basename()·
  A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 27ms (compile: 24ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
  Ecmascript file had an error
    1 |
  > 2 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 |
    4 |           export default async function handler(request) {
    5 |             basename()·
  A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 25ms (compile: 22ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
  Ecmascript file had an error
    1 |
  > 2 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 |
    4 |           export default async function handler(request) {
    5 |             basename()·
  A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 25ms (compile: 23ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e0714c1b.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:2:11
  Ecmascript file had an error
    1 |
  > 2 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 |
    4 |           export default async function handler(request) {
    5 |             basename()·
  A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 25ms (compile: 22ms, render: 3ms)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at expectUnsupportedModuleProdError (integration/edge-runtime-module-errors/test/utils.js:56:3)
  at integration/edge-runtime-module-errors/test/module-imports.test.ts:91:40
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/module-imports.test.ts:87:7)

● Edge runtime code with imports › Edge API statically importing node.js module › production mode › throws unsupported module error in production at runtime and prints error on logs

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'fs' module"
Received string:    "▲ Next.js 16.2.0-canary.4
- Local:         http://[::1]:42791
- Network:       http://[::]:42791
✓ Ready in 70ms
⨯ TypeError: t[0].getAttribute is not a function
    at <unknown> (../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1)

  at I (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1:7365)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1:9476)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1:9488)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async runWithTaggedErrors (../dist/server/web/sandbox/sandbox.js:86:21)
  at async NextNodeServer.runEdgeFunction (../dist/server/next-server.js:1370:24)
  ⨯ TypeError: t[0].getAttribute is not a function
      at <unknown> (../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1)
  at I (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1:7365)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1:9476)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_026ea943.js:1:9488)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async runWithTaggedErrors (../dist/server/web/sandbox/sandbox.js:86:21)
  at async NextNodeServer.runEdgeFunction (../dist/server/next-server.js:1370:24)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/module-imports.test.ts:109:43)

● Edge runtime code with imports › Middleware statically importing node.js module › throws unsupported module error in dev at runtime and highlights the faulty line

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'fs' module"
Received string:    "▲ Next.js 16.2.0-canary.4 (Turbopack)
- Local:         http://[::1]:38619
- Network:       http://[::]:38619
✓ Ready in 201ms
Creating turbopack project {
  dir: '/root/actions-runner/_work/next.js/next.js/test/integration/edge-runtime-module-errors',
  testMode: true
}
⚠ The \"middleware\" file convention is deprecated. Please use \"proxy\" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)·
⨯ Error [TypeError]: registration[0].getAttribute is not a function
    at ignore-listed frames
⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
Ecmascript file had an error
  1 |
  2 |           import { NextResponse } from 'next/server'
> 3 |           import { basename } from \"fs\"
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4 |
  5 |           export async function middleware(request) {
  6 |             basename()·
A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
Ecmascript file had an error
  1 |
  2 |           import { NextResponse } from 'next/server'
> 3 |           import { basename } from \"fs\"
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4 |
  5 |           export async function middleware(request) {
  6 |             basename()·
A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
 GET / 404 in 657ms (compile: -54220µs, proxy.ts: 654ms, render: 57ms)
⨯ Error [TypeError]: registration[0].getAttribute is not a function

  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 20ms (compile: -3483µs, proxy.ts: 18ms, render: 5ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 14ms (compile: -2670µs, proxy.ts: 13ms, render: 4ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 13ms (compile: -2507µs, proxy.ts: 12ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 14ms (compile: -2602µs, proxy.ts: 13ms, render: 4ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 12ms (compile: -2455µs, proxy.ts: 11ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:3:11
  Ecmascript file had an error
    1 |
    2 |           import { NextResponse } from 'next/server'
  > 3 |           import { basename } from \"fs\"
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 |
    5 |           export async function middleware(request) {
    6 |             basename()·
  A Node.js module is loaded ('fs' at line 3) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 14ms (compile: -2501µs, proxy.ts: 14ms, render: 3ms)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at expectUnsupportedModuleProdError (integration/edge-runtime-module-errors/test/utils.js:56:3)
  at integration/edge-runtime-module-errors/test/module-imports.test.ts:91:40
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/module-imports.test.ts:87:7)

● Edge runtime code with imports › Middleware statically importing node.js module › production mode › throws unsupported module error in production at runtime and prints error on logs

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'fs' module"
Received string:    "▲ Next.js 16.2.0-canary.4
- Local:         http://[::1]:36319
- Network:       http://[::]:36319
✓ Ready in 68ms
TypeError: t[0].getAttribute is not a function
    at <unknown> (../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_bbabdd90.js:1)

  at I (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_bbabdd90.js:1:7365)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_bbabdd90.js:1:9476)
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_bbabdd90.js:1:9488)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async runWithTaggedErrors (../dist/server/web/sandbox/sandbox.js:86:21)
  at async NextNodeServer.runMiddleware (../dist/server/next-server.js:1265:22)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/module-imports.test.ts:109:43)

● Edge runtime code with imports › Edge API importing unused node.js module › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  283 |       await retry(async () => {
  284 |         const res = await fetchViaHTTP(context.appPort, url)
> 285 |         expect(res.status).toBe(200)
      |                            ^
  286 |         expectNoError(moduleName)
  287 |       })
  288 |     })

  at toBe (integration/edge-runtime-module-errors/test/module-imports.test.ts:285:28)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/module-imports.test.ts:283:7)

● Edge runtime code with imports › Edge API importing unused node.js module › production mode › does not throw in production at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  312 |           await nextStart(context.appDir, port, options)
  313 |           const res = await fetchViaHTTP(port, url)
> 314 |           expect(res.status).toBe(200)
      |                              ^
  315 |
  316 |           expect(logs.output).not.toContain(
  317 |             getUnsupportedModuleWarning(moduleName)

  at Object.toBe (integration/edge-runtime-module-errors/test/module-imports.test.ts:314:30)

● Edge runtime code with imports › Middleware importing unused node.js module › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  283 |       await retry(async () => {
  284 |         const res = await fetchViaHTTP(context.appPort, url)
> 285 |         expect(res.status).toBe(200)
      |                            ^
  286 |         expectNoError(moduleName)
  287 |       })
  288 |     })

  at toBe (integration/edge-runtime-module-errors/test/module-imports.test.ts:285:28)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/module-imports.test.ts:283:7)

● Edge runtime code with imports › Middleware importing unused node.js module › production mode › does not throw in production at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  312 |           await nextStart(context.appDir, port, options)
  313 |           const res = await fetchViaHTTP(port, url)
> 314 |           expect(res.status).toBe(200)
      |                              ^
  315 |
  316 |           expect(logs.output).not.toContain(
  317 |             getUnsupportedModuleWarning(moduleName)

  at Object.toBe (integration/edge-runtime-module-errors/test/module-imports.test.ts:314:30)

pnpm test test/integration/edge-runtime-response-error/test/index.test.ts (turbopack) (job)

  • Custom Server using HTTP > with middleware $title > should read the expected url protocol in middleware (DD)
  • Custom Server using HTTPS > with middleware $title > should read the expected url protocol in middleware (DD)
Expand output

● Custom Server using HTTP › with middleware $title › should read the expected url protocol in middleware

expect(received).toBe(expected) // Object.is equality

Expected: "http://localhost:46419/middleware-augmented"
Received: null

  313 |       const path = '/middleware-augmented'
  314 |       const response = await fetchViaHTTP(nextUrl, path, undefined, { agent })
> 315 |       expect(response.headers.get('x-original-url')).toBe(
      |                                                      ^
  316 |         `${useHttps ? 'https' : 'http'}://localhost:${appPort}${path}`
  317 |       )
  318 |     })

  at Object.toBe (integration/custom-server/test/index.test.ts:315:54)

● Custom Server using HTTPS › with middleware $title › should read the expected url protocol in middleware

expect(received).toBe(expected) // Object.is equality

Expected: "https://localhost:43725/middleware-augmented"
Received: null

  313 |       const path = '/middleware-augmented'
  314 |       const response = await fetchViaHTTP(nextUrl, path, undefined, { agent })
> 315 |       expect(response.headers.get('x-original-url')).toBe(
      |                                                      ^
  316 |         `${useHttps ? 'https' : 'http'}://localhost:${appPort}${path}`
  317 |       )
  318 |     })

  at Object.toBe (integration/custom-server/test/index.test.ts:315:54)

pnpm test test/integration/edge-runtime-configurable-guards/test/index.test.ts (turbopack) (job)

  • config telemetry > production mode > detects rewrites, headers, and redirects for next build (DD)
  • config telemetry > production mode > emits telemetry for usage of experimental/cacheComponents (DD)
  • config telemetry > production mode > emits telemetry for usage of optimizeCss (DD)
  • config telemetry > production mode > emits telemetry for usage of nextScriptWorkers (DD)
  • config telemetry > production mode > emits telemetry for usage of middleware (DD)
  • config telemetry > production mode > emits telemetry for filesystem cache in build mode (DD)
  • config telemetry > production mode > emits telemetry for isolatedDevBuild enabled by default (DD)
  • config telemetry > production mode > emits telemetry for isolatedDevBuild disabled (DD)
Expand output

● config telemetry › production mode › detects rewrites, headers, and redirects for next build

TypeError: Cannot read properties of null (reading 'pop')

  34 |         try {
  35 |           const event1 = /NEXT_BUILD_OPTIMIZED[\s\S]+?{([\s\S]+?)}/
> 36 |             .exec(stderr)
     |                   ^
  37 |             .pop()
  38 |           expect(event1).toMatch(/"headersCount": 1/)
  39 |           expect(event1).toMatch(/"rewritesCount": 2/)

  at Object.stderr (integration/telemetry/test/config.test.ts:36:19)

● config telemetry › production mode › emits telemetry for usage of experimental/cacheComponents

expect(received).toContainEqual(expected) // deep equality

Expected value: {"featureName": "experimental/cacheComponents", "invocationCount": 1}
Received array: []

  281 |           'NEXT_BUILD_FEATURE_USAGE'
  282 |         )
> 283 |         expect(events).toContainEqual({
      |                        ^
  284 |           featureName: 'experimental/cacheComponents',
  285 |           invocationCount: 1,
  286 |         })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:283:24)

● config telemetry › production mode › emits telemetry for usage of optimizeCss

expect(received).toContainEqual(expected) // deep equality

Expected value: {"featureName": "experimental/optimizeCss", "invocationCount": 1}
Received array: []

  307 |           'NEXT_BUILD_FEATURE_USAGE'
  308 |         )
> 309 |         expect(events).toContainEqual({
      |                        ^
  310 |           featureName: 'experimental/optimizeCss',
  311 |           invocationCount: 1,
  312 |         })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:309:24)

● config telemetry › production mode › emits telemetry for usage of nextScriptWorkers

expect(received).toContainEqual(expected) // deep equality

Expected value: {"featureName": "experimental/nextScriptWorkers", "invocationCount": 1}
Received array: []

  333 |           'NEXT_BUILD_FEATURE_USAGE'
  334 |         )
> 335 |         expect(featureUsageEvents).toContainEqual({
      |                                    ^
  336 |           featureName: 'experimental/nextScriptWorkers',
  337 |           invocationCount: 1,
  338 |         })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:335:36)

● config telemetry › production mode › emits telemetry for usage of middleware

expect(received).toContainEqual(expected) // deep equality

Expected value: ObjectContaining {"middlewareCount": 1}
Received array: []

  356 |           'NEXT_BUILD_OPTIMIZED'
  357 |         )
> 358 |         expect(buildOptimizedEvents).toContainEqual(
      |                                      ^
  359 |           expect.objectContaining({
  360 |             middlewareCount: 1,
  361 |           })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:358:38)

● config telemetry › production mode › emits telemetry for filesystem cache in build mode

expect(received).toContainEqual(expected) // deep equality

Expected value: {"featureName": "turbopackFileSystemCache", "invocationCount": 1}
Received array: []

  672 |               'NEXT_BUILD_FEATURE_USAGE'
  673 |             )
> 674 |             expect(featureUsageEvents).toContainEqual({
      |                                        ^
  675 |               featureName: 'turbopackFileSystemCache',
  676 |               invocationCount: 1,
  677 |             })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:674:40)

● config telemetry › production mode › emits telemetry for isolatedDevBuild enabled by default

expect(received).toContainEqual(expected) // deep equality

Expected value: {"featureName": "experimental/isolatedDevBuild", "invocationCount": 1}
Received array: []

  743 |             'NEXT_BUILD_FEATURE_USAGE'
  744 |           )
> 745 |           expect(featureUsageEvents).toContainEqual({
      |                                      ^
  746 |             featureName: 'experimental/isolatedDevBuild',
  747 |             invocationCount: 1,
  748 |           })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:745:38)

● config telemetry › production mode › emits telemetry for isolatedDevBuild disabled

expect(received).toContainEqual(expected) // deep equality

Expected value: {"featureName": "experimental/isolatedDevBuild", "invocationCount": 0}
Received array: []

  771 |             'NEXT_BUILD_FEATURE_USAGE'
  772 |           )
> 773 |           expect(featureUsageEvents).toContainEqual({
      |                                      ^
  774 |             featureName: 'experimental/isolatedDevBuild',
  775 |             invocationCount: 0,
  776 |           })

  at Object.toContainEqual (integration/telemetry/test/config.test.ts:773:38)

pnpm test test/integration/edge-runtime-dynamic-code/test/index.test.ts (turbopack) (job)

  • Edge runtime code with imports > Edge API dynamically importing node.js module > development mode > throws unsupported module error in dev at runtime and highlights the faulty line (DD)
  • Edge runtime code with imports > Edge API dynamically importing node.js module in a lib > development mode > throws unsupported module error in dev at runtime and highlights the faulty line (DD)
  • Edge runtime code with imports > Edge API importing vanilla 3rd party module > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Edge API using Buffer polyfill > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Middleware dynamically importing node.js module > development mode > throws unsupported module error in dev at runtime and highlights the faulty line (DD)
  • Edge runtime code with imports > Middleware dynamically importing node.js module in a lib > development mode > throws unsupported module error in dev at runtime and highlights the faulty line (DD)
  • Edge runtime code with imports > Middleware importing vanilla 3rd party module > does not throw in dev at runtime (DD)
  • Edge runtime code with imports > Middleware using Buffer polyfill > does not throw in dev at runtime (DD)
Expand output

● Edge runtime code with imports › Edge API dynamically importing node.js module › development mode › throws unsupported module error in dev at runtime and highlights the faulty line

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'fs' module"
Received string:    "▲ Next.js 16.2.0-canary.4 (Turbopack)
- Local:         http://[::1]:46421
- Network:       http://[::]:46421
✓ Ready in 229ms
Creating turbopack project {
  dir: '/root/actions-runner/_work/next.js/next.js/test/integration/edge-runtime-module-errors',
  testMode: true
}
⚠ The \"middleware\" file convention is deprecated. Please use \"proxy\" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)·
⨯ Error [TypeError]: registration[0].getAttribute is not a function
    at ignore-listed frames
⨯ Error [TypeError]: registration[0].getAttribute is not a function
    at ignore-listed frames
⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
Ecmascript file had an error
  3 |
  4 |           export default async function handler(request) {
> 5 |             const { writeFile } = await import(\"fs\")
    |                                         ^^^^^^^^^^^^
  6 |             return Response.json({ ok: writeFile() })
  7 |           }
  8 |·
A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
 GET /api/route 500 in 656ms (compile: 600ms, render: 57ms)
⨯ Error [TypeError]: registration[0].getAttribute is not a function

  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export default async function handler(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return Response.json({ ok: writeFile() })
    7 |           }
    8 |·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 32ms (compile: 28ms, render: 4ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export default async function handler(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return Response.json({ ok: writeFile() })
    7 |           }
    8 |·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 25ms (compile: 22ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export default async function handler(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return Response.json({ ok: writeFile() })
    7 |           }
    8 |·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 29ms (compile: 26ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export default async function handler(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return Response.json({ ok: writeFile() })
    7 |           }
    8 |·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 26ms (compile: 23ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export default async function handler(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return Response.json({ ok: writeFile() })
    7 |           }
    8 |·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 25ms (compile: 23ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_e98209b0.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/pages/api/route.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export default async function handler(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return Response.json({ ok: writeFile() })
    7 |           }
    8 |·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET /api/route 500 in 26ms (compile: 23ms, render: 3ms)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at expectUnsupportedModuleProdError (integration/edge-runtime-module-errors/test/utils.js:56:3)
  at integration/edge-runtime-module-errors/test/index.test.ts:96:44
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/index.test.ts:93:11)

● Edge runtime code with imports › Middleware dynamically importing node.js module › development mode › throws unsupported module error in dev at runtime and highlights the faulty line

expect(received).toContain(expected) // indexOf

Expected substring: "The edge runtime does not support Node.js 'fs' module"
Received string:    "▲ Next.js 16.2.0-canary.4 (Turbopack)
- Local:         http://[::1]:40665
- Network:       http://[::]:40665
✓ Ready in 199ms
Creating turbopack project {
  dir: '/root/actions-runner/_work/next.js/next.js/test/integration/edge-runtime-module-errors',
  testMode: true
}
⚠ The \"middleware\" file convention is deprecated. Please use \"proxy\" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)·
⨯ Error [TypeError]: registration[0].getAttribute is not a function
    at ignore-listed frames
⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
Ecmascript file had an error
  3 |
  4 |           export async function middleware(request) {
> 5 |             const { writeFile } = await import(\"fs\")
    |                                         ^^^^^^^^^^^^
  6 |             return NextResponse.next()
  7 |           }
  8 |         ·
A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
Ecmascript file had an error
  3 |
  4 |           export async function middleware(request) {
> 5 |             const { writeFile } = await import(\"fs\")
    |                                         ^^^^^^^^^^^^
  6 |             return NextResponse.next()
  7 |           }
  8 |         ·
A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
 GET / 404 in 682ms (compile: -55969µs, proxy.ts: 679ms, render: 59ms)
⨯ Error [TypeError]: registration[0].getAttribute is not a function

  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 20ms (compile: -3417µs, proxy.ts: 19ms, render: 5ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 15ms (compile: -2739µs, proxy.ts: 14ms, render: 4ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 13ms (compile: -2550µs, proxy.ts: 12ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 14ms (compile: -2535µs, proxy.ts: 13ms, render: 4ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 13ms (compile: -2517µs, proxy.ts: 12ms, render: 3ms)
  ⨯ Error [TypeError]: registration[0].getAttribute is not a function
  at <unknown> (../../../test/integration/edge-runtime-module-errors/.next/dev/server/edge/chunks/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_c769fc65.js:1:55)
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
  ⚠ ./test/integration/edge-runtime-module-errors/middleware.js:5:41
  Ecmascript file had an error
    3 |
    4 |           export async function middleware(request) {
  > 5 |             const { writeFile } = await import(\"fs\")
      |                                         ^^^^^^^^^^^^
    6 |             return NextResponse.next()
    7 |           }
    8 |         ·
  A Node.js module is loaded ('fs' at line 5) which is not supported in the Edge Runtime.
  Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime··
   GET / 404 in 15ms (compile: -2657µs, proxy.ts: 14ms, render: 4ms)
  "
  at toContain (integration/edge-runtime-module-errors/test/utils.js:45:18)
  at expectUnsupportedModuleProdError (integration/edge-runtime-module-errors/test/utils.js:56:3)
  at integration/edge-runtime-module-errors/test/index.test.ts:96:44
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/index.test.ts:93:11)

● Edge runtime code with imports › Edge API dynamically importing node.js module in a lib › development mode › throws unsupported module error in dev at runtime and highlights the faulty line

TIMED OUT: success

undefined

TypeError: body used already for: http://localhost:39991/api/route

  758 |   }
  759 |   console.error('TIMED OUT CHECK: ', { regex, content, lastErr })
> 760 |   throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |         ^
  761 | }
  762 |
  763 | export class File {

  at check (lib/next-test-utils.ts:760:9)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/index.test.ts:186:13)

● Edge runtime code with imports › Middleware dynamically importing node.js module in a lib › development mode › throws unsupported module error in dev at runtime and highlights the faulty line

TIMED OUT: success

undefined

TypeError: body used already for: http://localhost:40983/

  758 |   }
  759 |   console.error('TIMED OUT CHECK: ', { regex, content, lastErr })
> 760 |   throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |         ^
  761 | }
  762 |
  763 | export class File {

  at check (lib/next-test-utils.ts:760:9)
  at Object.<anonymous> (integration/edge-runtime-module-errors/test/index.test.ts:186:13)

● Edge runtime code with imports › Edge API importing vanilla 3rd party module › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  324 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  325 |       const res = await fetchViaHTTP(context.appPort, url)
> 326 |       expect(res.status).toBe(200)
      |                          ^
  327 |       expect(res.headers.get('x-from-runtime')).toBeDefined()
  328 |       expectNoError(moduleName)
  329 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:326:26)

● Edge runtime code with imports › Middleware importing vanilla 3rd party module › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  324 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  325 |       const res = await fetchViaHTTP(context.appPort, url)
> 326 |       expect(res.status).toBe(200)
      |                          ^
  327 |       expect(res.headers.get('x-from-runtime')).toBeDefined()
  328 |       expectNoError(moduleName)
  329 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:326:26)

● Edge runtime code with imports › Edge API using Buffer polyfill › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  393 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  394 |       const res = await fetchViaHTTP(context.appPort, url)
> 395 |       expect(res.status).toBe(200)
      |                          ^
  396 |       expect(res.headers.get('x-from-runtime')).toBe('false')
  397 |       expectNoError(moduleName)
  398 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:395:26)

● Edge runtime code with imports › Middleware using Buffer polyfill › does not throw in dev at runtime

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  393 |       context.app = await launchApp(context.appDir, context.appPort, appOption)
  394 |       const res = await fetchViaHTTP(context.appPort, url)
> 395 |       expect(res.status).toBe(200)
      |                          ^
  396 |       expect(res.headers.get('x-from-runtime')).toBe('false')
  397 |       expectNoError(moduleName)
  398 |     })

  at Object.toBe (integration/edge-runtime-module-errors/test/index.test.ts:395:26)

pnpm test test/integration/next-image-new/default/test/index.test.ts (turbopack) (job)

  • Image Component Default Tests > production mode > should load the images (DD)
  • Image Component Default Tests > production mode > should preload priority images (DD)
  • Image Component Default Tests > production mode > should work with preload prop (DD)
  • Image Component Default Tests > production mode > should not pass through user-provided srcset (causing a flash) (DD)
  • Image Component Default Tests > production mode > should update the image on src change (DD)
  • Image Component Default Tests > production mode > should callback onLoadingComplete when image is fully loaded (DD)
  • Image Component Default Tests > production mode > should callback native onLoad with sythetic event (DD)
  • Image Component Default Tests > production mode > should callback native onError when error occurred while loading image (DD)
  • Image Component Default Tests > production mode > should callback native onError even when error before hydration (DD)
  • Image Component Default Tests > production mode > should work with image with blob src (DD)
  • Image Component Default Tests > production mode > should work when using flexbox (DD)
  • Image Component Default Tests > production mode > should work when using overrideSrc prop (DD)
  • Image Component Default Tests > production mode > should work with sizes and automatically use responsive srcset (DD)
  • Image Component Default Tests > production mode > should render no wrappers or sizers (DD)
  • Image Component Default Tests > production mode > should lazy load with placeholder=blur (DD)
  • Image Component Default Tests > production mode > should handle the styles prop appropriately (DD)
  • Image Component Default Tests > production mode > should warn when legacy prop layout=fill (DD)
  • Image Component Default Tests > production mode > should warn when legacy prop layout=responsive (DD)
  • Image Component Default Tests > production mode > should render picture via getImageProps (DD)
  • Image Component Default Tests > production mode > should not create an image folder in server/chunks (DD)
  • Image Component Default Tests > production mode > should render as unoptimized with missing src prop (DD)
  • Image Component Default Tests > production mode > should render as unoptimized with empty string src prop (DD)
  • Image Component Default Tests > production mode > should correctly ignore prose styles (DD)
  • Image Component Default Tests > production mode > should apply style inheritance for img elements but not wrapper elements (DD)
  • Image Component Default Tests > production mode > should apply filter style after image loads (DD)
  • Image Component Default Tests > production mode > should emit image for next/dynamic with non ssr case (DD)
  • Image Component Default Tests > production mode > should correctly rotate image (DD)
  • Image Component Default Tests > production mode > should create images folder in static/media for edge runtime (DD)
  • Image Component Default Tests > production mode > should have data url placeholder when enabled (DD)
  • Image Component Default Tests > production mode > should remove data url placeholder after image loads (DD)
  • Image Component Default Tests > production mode > should render correct objectFit when data url placeholder and fill (DD)
  • Image Component Default Tests > production mode > should have blurry placeholder when enabled (DD)
  • Image Component Default Tests > production mode > should remove blurry placeholder after image loads (DD)
  • Image Component Default Tests > production mode > should render correct objectFit when blurDataURL and fill (DD)
  • Image Component Default Tests > production mode > should be valid HTML (DD)
  • Image Component Default Tests > production mode > Fill-mode tests > should include a data-attribute on fill images (DD)
  • Image Component Default Tests > production mode > Fill-mode tests > should add position:absolute to fill images (DD)
  • Image Component Default Tests > production mode > Fill-mode tests > should add 100% width and height to fill images (DD)
  • Image Component Default Tests > production mode > Fill-mode tests > should add position styles to fill images (DD)
Expand output

● Image Component Default Tests › production mode › should load the images

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should preload priority images

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should work with preload prop

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should not pass through user-provided srcset (causing a flash)

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should update the image on src change

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should callback onLoadingComplete when image is fully loaded

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should callback native onLoad with sythetic event

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should callback native onError when error occurred while loading image

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should callback native onError even when error before hydration

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should work with image with blob src

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should work when using flexbox

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should work when using overrideSrc prop

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should work with sizes and automatically use responsive srcset

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should render no wrappers or sizers

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should lazy load with placeholder=blur

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should handle the styles prop appropriately

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should warn when legacy prop layout=fill

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should warn when legacy prop layout=responsive

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should render picture via getImageProps

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should not create an image folder in server/chunks

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should render as unoptimized with missing src prop

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should render as unoptimized with empty string src prop

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should correctly ignore prose styles

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should apply style inheritance for img elements but not wrapper elements

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should apply filter style after image loads

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should emit image for next/dynamic with non ssr case

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › Fill-mode tests › should include a data-attribute on fill images

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › Fill-mode tests › should include a data-attribute on fill images

page.goto: Protocol error (Page.navigate): Cannot navigate to invalid URL
Call log:
  - navigating to "http://localhost:undefined/fill", waiting until "load"

  343 |     await opts?.beforePageLoad?.(page)
  344 |
> 345 |     await page.goto(url, { waitUntil: opts?.waitUntil ?? 'load' })
      |                ^
  346 |   }
  347 |
  348 |   back(options?: Parameters<Page['goBack']>[0]) {

  at Playwright.goto (lib/browsers/playwright.ts:345:16)
  at webdriver (lib/next-webdriver.ts:156:3)
  at Object.<anonymous> (integration/next-image-new/default/test/index.test.ts:1505:17)

● Image Component Default Tests › production mode › Fill-mode tests › should add position:absolute to fill images

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › Fill-mode tests › should add position:absolute to fill images

page.goto: Protocol error (Page.navigate): Cannot navigate to invalid URL
Call log:
  - navigating to "http://localhost:undefined/fill", waiting until "load"

  343 |     await opts?.beforePageLoad?.(page)
  344 |
> 345 |     await page.goto(url, { waitUntil: opts?.waitUntil ?? 'load' })
      |                ^
  346 |   }
  347 |
  348 |   back(options?: Parameters<Page['goBack']>[0]) {

  at Playwright.goto (lib/browsers/playwright.ts:345:16)
  at webdriver (lib/next-webdriver.ts:156:3)
  at Object.<anonymous> (integration/next-image-new/default/test/index.test.ts:1505:17)

● Image Component Default Tests › production mode › Fill-mode tests › should add 100% width and height to fill images

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › Fill-mode tests › should add 100% width and height to fill images

page.goto: Protocol error (Page.navigate): Cannot navigate to invalid URL
Call log:
  - navigating to "http://localhost:undefined/fill", waiting until "load"

  343 |     await opts?.beforePageLoad?.(page)
  344 |
> 345 |     await page.goto(url, { waitUntil: opts?.waitUntil ?? 'load' })
      |                ^
  346 |   }
  347 |
  348 |   back(options?: Parameters<Page['goBack']>[0]) {

  at Playwright.goto (lib/browsers/playwright.ts:345:16)
  at webdriver (lib/next-webdriver.ts:156:3)
  at Object.<anonymous> (integration/next-image-new/default/test/index.test.ts:1505:17)

● Image Component Default Tests › production mode › Fill-mode tests › should add position styles to fill images

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › Fill-mode tests › should add position styles to fill images

page.goto: Protocol error (Page.navigate): Cannot navigate to invalid URL
Call log:
  - navigating to "http://localhost:undefined/fill", waiting until "load"

  343 |     await opts?.beforePageLoad?.(page)
  344 |
> 345 |     await page.goto(url, { waitUntil: opts?.waitUntil ?? 'load' })
      |                ^
  346 |   }
  347 |
  348 |   back(options?: Parameters<Page['goBack']>[0]) {

  at Playwright.goto (lib/browsers/playwright.ts:345:16)
  at webdriver (lib/next-webdriver.ts:156:3)
  at Object.<anonymous> (integration/next-image-new/default/test/index.test.ts:1505:17)

● Image Component Default Tests › production mode › should correctly rotate image

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should create images folder in static/media for edge runtime

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should have data url placeholder when enabled

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should remove data url placeholder after image loads

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should render correct objectFit when data url placeholder and fill

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should have blurry placeholder when enabled

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should remove blurry placeholder after image loads

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should render correct objectFit when blurDataURL and fill

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

● Image Component Default Tests › production mode › should be valid HTML

command failed with code 1 signal null
▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...
  Finished TypeScript in 76ms ...
  Creating an optimized production build ...
Turbopack build encountered 1 warnings:
./test/integration/next-image-new/default/public/test.avif
AVIF image not supported
This version of Turbopack does not support AVIF images, will emit without optimization or encoding

Import trace:
  Browser:
    ./test/integration/next-image-new/default/public/test.avif
    ./test/integration/next-image-new/default/pages/static-img.js


✓ Compiled successfully in 2.7s
  Collecting page data using 19 workers ...
⚠ You are using an experimental edge runtime, the API might change.
TypeError: b[0].getAttribute is not a function
    at <unknown> (../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1)

  at N (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:7377)
      at Array.forEach (<anonymous>)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9488)
  at <unknown> (../../../test/integration/next-image-new/default/.next/server/edge/chunks/ssr/turbopack-packages_next_dist_esm_build_templates_edge-wrapper_23f2ae0f.js:1:9500)
  at evaluateInContext (../dist/server/web/sandbox/context.js:444:38)
  at getRuntimeContext (../dist/server/web/sandbox/sandbox.js:80:9)
  at async (../dist/build/utils.js:660:29)
  > Build error occurred
  Error: Failed to collect page data for /edge
  at <unknown> (../dist/build/utils.js:849:37) {
    type: 'Error'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:359:11)

pnpm test test/integration/middleware-src/test/index.test.ts (turbopack) (job)

  • Image Loader Config with Edge Runtime > development mode > should add "src" to img1 based on the loader config (DD)
  • Image Loader Config with Edge Runtime > development mode > should add "srcset" to img1 based on the loader config (DD)
  • Image Loader Config with Edge Runtime > development mode > should add "src" to img2 based on the loader prop (DD)
  • Image Loader Config with Edge Runtime > development mode > should add "srcset" to img2 based on the loader prop (DD)
Expand output

● Image Loader Config with Edge Runtime › development mode › should add "src" to img1 based on the loader config

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#img1') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at Object.elementById (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:21:26)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:455:17)
  at Object.getAttribute (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:21:46)

● Image Loader Config with Edge Runtime › development mode › should add "srcset" to img1 based on the loader config

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#img1') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at Object.elementById (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:27:26)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:455:17)
  at Object.getAttribute (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:27:46)

● Image Loader Config with Edge Runtime › development mode › should add "src" to img2 based on the loader prop

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#img2') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at Object.elementById (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:33:26)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:455:17)
  at Object.getAttribute (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:33:46)

● Image Loader Config with Edge Runtime › development mode › should add "srcset" to img2 based on the loader prop

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#img2') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at Object.elementById (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:39:26)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:455:17)
  at Object.getAttribute (integration/next-image-new/loader-config-edge-runtime/test/index.test.ts:39:46)

pnpm test test/integration/next-image-new/loader-config-edge-runtime/test/index.test.ts (turbopack) (job)

  • Middleware development errors > when matcher is added > sends response correctly (DD)
  • Middleware development errors > when middleware is added > sends response correctly (DD)
  • Middleware development errors > when middleware is removed > sends response correctly (DD)
  • Middleware development errors > when middleware is removed and re-added > sends response correctly (DD)
Expand output

● Middleware development errors › when middleware is removed › sends response correctly

TIMED OUT: success

undefined

Error: expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  758 |   }
  759 |   console.error('TIMED OUT CHECK: ', { regex, content, lastErr })
> 760 |   throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |         ^
  761 | }
  762 |
  763 | export class File {

  at check (lib/next-test-utils.ts:760:9)
  at assertMiddlewareFetch (integration/middleware-dev-update/test/index.test.ts:45:5)
  at Object.<anonymous> (integration/middleware-dev-update/test/index.test.ts:63:7)

● Middleware development errors › when middleware is removed and re-added › sends response correctly

TIMED OUT: success

undefined

Error: expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  758 |   }
  759 |   console.error('TIMED OUT CHECK: ', { regex, content, lastErr })
> 760 |   throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |         ^
  761 | }
  762 |
  763 | export class File {

  at check (lib/next-test-utils.ts:760:9)
  at assertMiddlewareFetch (integration/middleware-dev-update/test/index.test.ts:45:5)
  at Object.<anonymous> (integration/middleware-dev-update/test/index.test.ts:78:7)

● Middleware development errors › when middleware is added › sends response correctly

thrown: "Exceeded timeout of 60000 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."

   95 |     })
   96 |
>  97 |     it('sends response correctly', async () => {
      |     ^
   98 |       await retry(() => assertMiddlewareFetch(true))
   99 |       await assertMiddlewareRender(true)
  100 |     })

  at it (integration/middleware-dev-update/test/index.test.ts:97:5)
  at describe (integration/middleware-dev-update/test/index.test.ts:90:3)
  at Object.describe (integration/middleware-dev-update/test/index.test.ts:21:1)

● Middleware development errors › when matcher is added › sends response correctly

TIMED OUT: success

undefined

Error: expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  758 |   }
  759 |   console.error('TIMED OUT CHECK: ', { regex, content, lastErr })
> 760 |   throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |         ^
  761 | }
  762 |
  763 | export class File {

  at check (lib/next-test-utils.ts:760:9)
  at assertMiddlewareFetch (integration/middleware-dev-update/test/index.test.ts:45:5)
  at Object.<anonymous> (integration/middleware-dev-update/test/index.test.ts:114:7)

pnpm test-start-turbo test/e2e/app-dir/app-edge-root-layout/index.test.ts (turbopack) (job)

  • Instrumentation Hook > with-async-edge-page > with-async-edge-page should run the instrumentation hook (DD)
  • Instrumentation Hook > with-edge-api > with-edge-api should run the instrumentation hook (DD)
  • Instrumentation Hook > with-edge-page > with-edge-page should run the instrumentation hook (DD)
  • Instrumentation Hook > with-middleware > with-middleware should run the instrumentation hook (DD)
Expand output

● Instrumentation Hook › with-middleware › with-middleware should run the instrumentation hook

TIMED OUT: /instrumentation hook on the edge/

▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
  Running TypeScript ...

  We detected TypeScript in your project and created a tsconfig.json file for you.
  Finished TypeScript in 798ms ...
  Creating an optimized production build ...
✓ Compiled successfully in 927ms
  Collecting page data using 19 workers ...
  Generating static pages using 19 workers (0/3) ...
✓ Generating static pages using 19 workers (3/3) in 132ms
  Finalizing page optimization ...

Route (pages)
┌ ○ /
└ ○ /404

ƒ Proxy (Middleware)

○  (Static)  prerendered as static content

▲ Next.js 16.2.0-canary.4
- Local:         http://localhost:45093
- Network:       http://144.76.218.188:45093
✓ Ready in 66ms
instrumentation hook on nodejs
TypeError: t[0].getAttribute is not a function
    at <unknown> (.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1)

  at I (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:7306)
      at Array.forEach (<anonymous>)
  at <unknown> (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:9417)
  at <unknown> (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:9429)
  undefined
  at check (lib/next-test-utils.ts:760:9)
  at Object.<anonymous> (e2e/instrumentation-hook/instrumentation-hook.test.ts:33:7)

● Instrumentation Hook › with-edge-api › with-edge-api should run the instrumentation hook

TIMED OUT: /instrumentation hook on the edge/

▲ Next.js 16.2.0-canary.4 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Running TypeScript ...

  We detected TypeScript in your project and created a tsconfig.json file for you.
  Finished TypeScript in 771ms ...
  Creating an optimized production build ...
✓ Compiled successfully in 917ms
  Collecting page data using 19 workers ...
  Generating static pages using 19 workers (0/2) ...
✓ Generating static pages using 19 workers (2/2) in 130ms
  Finalizing page optimization ...

Route (pages)
┌ ○ /404
└ ƒ /api

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

▲ Next.js 16.2.0-canary.4
- Local:         http://localhost:37837
- Network:       http://144.76.218.188:37837
✓ Ready in 66ms
instrumentation hook on nodejs
⨯ TypeError: t[0].getAttribute is not a function
    at <unknown> (.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1)

  at I (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:7306)
      at Array.forEach (<anonymous>)
  at <unknown> (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:9417)
  at <unknown> (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:9429)
  ⨯ TypeError: t[0].getAttribute is not a function
      at <unknown> (.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1)
  at I (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:7306)
      at Array.forEach (<anonymous>)
  at <unknown> (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:9417)
  at <unknown> (../.next/server/edge/chunks/1e0f4_next_dist_esm_build_templates_edge-wrapper_e2f87b2c.js:1:9429)
  undefined
  at check (lib/next-test-utils.ts:760:9)
  at Object.<anonymous> (e2e/instrumentation-hook/instrumentation-hook.test.ts:40:7)

● Instrumentation Hook › with-edge-page › with-edge-page should run the instrumentation hook

next build failed with code/signal 1

  77 |             if (code || signal)
  78 |               reject(
> 79 |                 new Error(
     |                 ^
  80 |                   `next build failed with code/signal ${code || signal}`
  81 |                 )
  82 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:79:17)

● Instrumentation Hook › with-async-edge-page › with-async-edge-page should run the instrumentation hook

next build failed with code/signal 1

  77 |             if (code || signal)
  78 |               reject(
> 79 |                 new Error(
     |                 ^
  80 |                   `next build failed with code/signal ${code || signal}`
  81 |                 )
  82 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:79:17)

pnpm test-start-turbo test/e2e/app-dir/actions/app-action-progressive-enhancement.test.ts (turbopack) (job)

  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/static (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/1 (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/2 (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/1/account (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/static (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/1 (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/2 (DD)
  • app dir - hooks > from pages > should have the correct hooks at /adapter-hooks/1/account (DD)
  • app dir - hooks > useDraftMode > should use initial rand when draft mode be disabled (DD)
  • app dir - hooks > useDraftMode > should generate rand when draft mode enabled (DD)
  • app dir - hooks > usePathname > should have the correct pathname (DD)
  • app dir - hooks > usePathname > should have the canonical url pathname on rewrite (DD)
  • app dir - hooks > useRouter > should allow access to the router (DD)
  • app dir - hooks > useSearchParams > should have the correct search params (DD)
  • app dir - hooks > useSearchParams > should have the canonical url search params on rewrite (DD)
  • app dir - hooks > useSearchParams > should be able to use instanceof ReadonlyURLSearchParams (DD)
  • app dir - hooks > useSelectedLayoutSegment > should have the correct layout segment at /hooks/use-selected-layout-segment/first (DD)
  • app dir - hooks > useSelectedLayoutSegment > should have the correct layout segment at /hooks/use-selected-layout-segment/first/slug1 (DD)
  • app dir - hooks > useSelectedLayoutSegment > should have the correct layout segment at /hooks/use-selected-layout-segment/first/slug2/second/a/b (DD)
  • app dir - hooks > useSelectedLayoutSegment > should return null in pages (DD)
  • app dir - hooks > useSelectedLayoutSegments > should have the correct layout segments at /hooks/use-selected-layout-segment/first (DD)
  • app dir - hooks > useSelectedLayoutSegments > should have the correct layout segments at /hooks/use-selected-layout-segment/first/slug1 (DD)
  • app dir - hooks > useSelectedLayoutSegments > should have the correct layout segments at /hooks/use-selected-layout-segment/first/slug2/second (DD)
  • app dir - hooks > useSelectedLayoutSegments > should have the correct layout segments at /hooks/use-selected-layout-segment/first/slug2/second/a/b (DD)
  • app dir - hooks > useSelectedLayoutSegments > should have the correct layout segments at /hooks/use-selected-layout-segment/rewritten (DD)
  • app dir - hooks > useSelectedLayoutSegments > should have the correct layout segments at /hooks/use-selected-layout-segment/rewritten-middleware (DD)
  • app dir - hooks > useSelectedLayoutSegments > should return an empty array in pages (DD)
Expand output

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/static

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/1

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/2

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/1/account

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/static

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/1

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/2

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › from pages › should have the correct hooks at /adapter-hooks/1/account

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router-ready') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:25:23)

● app dir - hooks › usePathname › should have the correct pathname

expect(received).toBe(expected) // Object.is equality

Expected: "/hooks/use-pathname"
Received: undefined

  38 |     it('should have the correct pathname', async () => {
  39 |       const $ = await next.render$('/hooks/use-pathname')
> 40 |       expect($('#pathname').attr('data-pathname')).toBe('/hooks/use-pathname')
     |                                                    ^
  41 |     })
  42 |
  43 |     it('should have the canonical url pathname on rewrite', async () => {

  at Object.toBe (e2e/app-dir/hooks/hooks.test.ts:40:52)

● app dir - hooks › usePathname › should have the canonical url pathname on rewrite

expect(received).toBe(expected) // Object.is equality

Expected: "/rewritten-use-pathname"
Received: undefined

  43 |     it('should have the canonical url pathname on rewrite', async () => {
  44 |       const $ = await next.render$('/rewritten-use-pathname')
> 45 |       expect($('#pathname').attr('data-pathname')).toBe(
     |                                                    ^
  46 |         '/rewritten-use-pathname'
  47 |       )
  48 |     })

  at Object.toBe (e2e/app-dir/hooks/hooks.test.ts:45:52)

● app dir - hooks › useSearchParams › should have the correct search params

expect(received).toBe(expected) // Object.is equality

Expected: "value"
Received: ""

  54 |         '/hooks/use-search-params?first=value&second=other%20value&third'
  55 |       )
> 56 |       expect($('#params-first').text()).toBe('value')
     |                                         ^
  57 |       expect($('#params-second').text()).toBe('other value')
  58 |       expect($('#params-third').text()).toBe('')
  59 |       expect($('#params-not-real').text()).toBe('N/A')

  at Object.toBe (e2e/app-dir/hooks/hooks.test.ts:56:41)

● app dir - hooks › useSearchParams › should have the canonical url search params on rewrite

expect(received).toBe(expected) // Object.is equality

Expected: "a"
Received: ""

  66 |           '/rewritten-use-search-params?first=a&second=b&third=c'
  67 |         )
> 68 |         expect($('#params-first').text()).toBe('a')
     |                                           ^
  69 |         expect($('#params-second').text()).toBe('b')
  70 |         expect($('#params-third').text()).toBe('c')
  71 |         expect($('#params-not-real').text()).toBe('N/A')

  at Object.toBe (e2e/app-dir/hooks/hooks.test.ts:68:43)

● app dir - hooks › useSearchParams › should be able to use instanceof ReadonlyURLSearchParams

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('[data-testid="server"]') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Object.<anonymous> (e2e/app-dir/hooks/hooks.test.ts:80:32)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Object.elementByCss (e2e/app-dir/hooks/hooks.test.ts:82:12)

● app dir - hooks › useDraftMode › should use initial rand when draft mode be disabled

expect(received).toBe(expected) // Object.is equality

Expected: "DISABLED"
Received: ""

   98 |     it('should use initial rand when draft mode be disabled', async () => {
   99 |       const $ = await next.render$('/hooks/use-draft-mode')
> 100 |       expect($('#draft-mode-val').text()).toBe('DISABLED')
      |                                           ^
  101 |       expect($('#rand').text()).toBeDefined()
  102 |       initialRand = $('#rand').text()
  103 |     })

  at Object.toBe (e2e/app-dir/hooks/hooks.test.ts:100:43)

● app dir - hooks › useDraftMode › should generate rand when draft mode enabled

expect(received).toBe(expected) // Object.is equality

Expected: "ENABLED"
Received: ""

  118 |         }
  119 |       )
> 120 |       expect($('#draft-mode-val').text()).toBe('ENABLED')
      |                                           ^
  121 |       expect($('#rand').text()).not.toBe(initialRand)
  122 |     })
  123 |   })

  at Object.toBe (e2e/app-dir/hooks/hooks.test.ts:120:43)

● app dir - hooks › useRouter › should allow access to the router

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#router') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Object.waitForElementByCss (e2e/app-dir/hooks/hooks.test.ts:131:21)

● app dir - hooks › useSelectedLayoutSegments › should have the correct layout segments at /hooks/use-selected-layout-segment/first

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  154 |         const $ = await next.render$(path)
  155 |
> 156 |         expect(JSON.parse($('#outer-layout').text())).toEqual(outerLayout)
      |                     ^
  157 |         expect(JSON.parse($('#inner-layout').text())).toEqual(innerLayout)
  158 |       }
  159 |     )

  at parse (e2e/app-dir/hooks/hooks.test.ts:156:21)

● app dir - hooks › useSelectedLayoutSegments › should have the correct layout segments at /hooks/use-selected-layout-segment/first/slug1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  154 |         const $ = await next.render$(path)
  155 |
> 156 |         expect(JSON.parse($('#outer-layout').text())).toEqual(outerLayout)
      |                     ^
  157 |         expect(JSON.parse($('#inner-layout').text())).toEqual(innerLayout)
  158 |       }
  159 |     )

  at parse (e2e/app-dir/hooks/hooks.test.ts:156:21)

● app dir - hooks › useSelectedLayoutSegments › should have the correct layout segments at /hooks/use-selected-layout-segment/first/slug2/second

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  154 |         const $ = await next.render$(path)
  155 |
> 156 |         expect(JSON.parse($('#outer-layout').text())).toEqual(outerLayout)
      |                     ^
  157 |         expect(JSON.parse($('#inner-layout').text())).toEqual(innerLayout)
  158 |       }
  159 |     )

  at parse (e2e/app-dir/hooks/hooks.test.ts:156:21)

● app dir - hooks › useSelectedLayoutSegments › should have the correct layout segments at /hooks/use-selected-layout-segment/first/slug2/second/a/b

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  154 |         const $ = await next.render$(path)
  155 |
> 156 |         expect(JSON.parse($('#outer-layout').text())).toEqual(outerLayout)
      |                     ^
  157 |         expect(JSON.parse($('#inner-layout').text())).toEqual(innerLayout)
  158 |       }
  159 |     )

  at parse (e2e/app-dir/hooks/hooks.test.ts:156:21)

● app dir - hooks › useSelectedLayoutSegments › should have the correct layout segments at /hooks/use-selected-layout-segment/rewritten

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  154 |         const $ = await next.render$(path)
  155 |
> 156 |         expect(JSON.parse($('#outer-layout').text())).toEqual(outerLayout)
      |                     ^
  157 |         expect(JSON.parse($('#inner-layout').text())).toEqual(innerLayout)
  158 |       }
  159 |     )

  at parse (e2e/app-dir/hooks/hooks.test.ts:156:21)

● app dir - hooks › useSelectedLayoutSegments › should have the correct layout segments at /hooks/use-selected-layout-segment/rewritten-middleware

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  154 |         const $ = await next.render$(path)
  155 |
> 156 |         expect(JSON.parse($('#outer-layout').text())).toEqual(outerLayout)
      |                     ^
  157 |         expect(JSON.parse($('#inner-layout').text())).toEqual(innerLayout)
  158 |       }
  159 |     )

  at parse (e2e/app-dir/hooks/hooks.test.ts:156:21)

● app dir - hooks › useSelectedLayoutSegments › should return an empty array in pages

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  164 |       )
  165 |
> 166 |       expect(JSON.parse($('#page-layout-segments').text())).toEqual([])
      |                   ^
  167 |     })
  168 |   })
  169 |

  at Object.parse (e2e/app-dir/hooks/hooks.test.ts:166:19)

● app dir - hooks › useSelectedLayoutSegment › should have the correct layout segment at /hooks/use-selected-layout-segment/first

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  179 |         const $ = await next.render$(path)
  180 |
> 181 |         expect(JSON.parse($('#outer-layout-segment').text())).toEqual(
      |                     ^
  182 |           outerLayout
  183 |         )
  184 |         expect(JSON.parse($('#inner-layout-segment').text())).toEqual(

  at parse (e2e/app-dir/hooks/hooks.test.ts:181:21)

● app dir - hooks › useSelectedLayoutSegment › should have the correct layout segment at /hooks/use-selected-layout-segment/first/slug1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  179 |         const $ = await next.render$(path)
  180 |
> 181 |         expect(JSON.parse($('#outer-layout-segment').text())).toEqual(
      |                     ^
  182 |           outerLayout
  183 |         )
  184 |         expect(JSON.parse($('#inner-layout-segment').text())).toEqual(

  at parse (e2e/app-dir/hooks/hooks.test.ts:181:21)

● app dir - hooks › useSelectedLayoutSegment › should have the correct layout segment at /hooks/use-selected-layout-segment/first/slug2/second/a/b

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  179 |         const $ = await next.render$(path)
  180 |
> 181 |         expect(JSON.parse($('#outer-layout-segment').text())).toEqual(
      |                     ^
  182 |           outerLayout
  183 |         )
  184 |         expect(JSON.parse($('#inner-layout-segment').text())).toEqual(

  at parse (e2e/app-dir/hooks/hooks.test.ts:181:21)

● app dir - hooks › useSelectedLayoutSegment › should return null in pages

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)

  193 |       )
  194 |
> 195 |       expect(JSON.parse($('#page-layout-segment').text())).toEqual(null)
      |                   ^
  196 |     })
  197 |   })
  198 | })

  at Object.parse (e2e/app-dir/hooks/hooks.test.ts:195:19)

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 22, 2026

Stats from current PR

✅ No significant changes detected

📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 507ms 507ms ▁▁█▁▁
Cold (Ready in log) 489ms 485ms ▆▁█▂▇
Cold (First Request) 958ms 955ms █▁▅▂█
Warm (Listen) 508ms 508ms ▁▁█▁▁
Warm (Ready in log) 479ms 482ms ▁▁█▃▁
Warm (First Request) 373ms 372ms ▅▁█▇▅
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 557ms 558ms ▁▅█▁▅
Cold (Ready in log) 512ms 518ms █▅█▇▁
Cold (First Request) 2.255s 2.235s ▆▆█▆▁
Warm (Listen) 558ms 557ms ▁▁█▁▁
Warm (Ready in log) 524ms 516ms ▅▅▆▅▁
Warm (First Request) 2.260s 2.252s ▅▆█▄▁

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 4.959s 5.011s ▁▂█▃▁
Cached Build 4.985s 4.973s ▁▂█▃▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 17.113s 17.050s ▂▃█▂▂
Cached Build 17.417s 17.249s ▂▃█▄▂
node_modules Size 461 MB 461 MB █████
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles: **432 kB** → **432 kB** ✅ -32 B

82 files with content-based hashes (individual files not comparable between builds)

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 762 B 768 B
Total 762 B 768 B ⚠️ +6 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 450 B 451 B
Total 450 B 451 B ⚠️ +1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
2086.HASH.js gzip 169 B N/A -
2161-HASH.js gzip 5.41 kB N/A -
2747-HASH.js gzip 4.48 kB N/A -
4322-HASH.js gzip 52.7 kB N/A -
ec793fe8-HASH.js gzip 62.3 kB N/A -
framework-HASH.js gzip 59.8 kB 59.8 kB
main-app-HASH.js gzip 249 B 254 B 🔴 +5 B (+2%)
main-HASH.js gzip 38.7 kB 39.1 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
1596.HASH.js gzip N/A 169 B -
2658-HASH.js gzip N/A 52.4 kB -
6349-HASH.js gzip N/A 4.46 kB -
7019-HASH.js gzip N/A 5.43 kB -
b17a3386-HASH.js gzip N/A 62.3 kB -
Total 226 kB 226 kB ⚠️ +57 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 193 B
_error-HASH.js gzip 182 B 182 B
css-HASH.js gzip 336 B 335 B
dynamic-HASH.js gzip 1.8 kB 1.8 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 352 B 349 B
hooks-HASH.js gzip 385 B 384 B
image-HASH.js gzip 580 B 580 B
index-HASH.js gzip 259 B 258 B
link-HASH.js gzip 2.5 kB 2.51 kB
routerDirect..HASH.js gzip 319 B 317 B
script-HASH.js gzip 385 B 387 B
withRouter-HASH.js gzip 316 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.97 kB 7.96 kB ✅ -8 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 126 kB 126 kB
page.js gzip 244 kB 240 kB 🟢 4.5 kB (-2%)
Total 371 kB 366 kB ✅ -4.62 kB
Middleware
Canary PR Change
middleware-b..fest.js gzip 617 B 618 B
middleware-r..fest.js gzip 155 B 156 B
middleware.js gzip 33.2 kB 33.3 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 34.8 kB 34.9 kB ⚠️ +124 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 738 B 738 B
Total 738 B 738 B
Build Cache
Canary PR Change
0.pack gzip 3.71 MB 3.72 MB 🔴 +4.19 kB (+0%)
index.pack gzip 103 kB 102 kB
index.pack.old gzip 101 kB 102 kB
Total 3.92 MB 3.92 MB ⚠️ +4.43 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 306 kB 306 kB
app-page-exp..prod.js gzip 163 kB 163 kB
app-page-tur...dev.js gzip 306 kB 306 kB
app-page-tur..prod.js gzip 163 kB 163 kB
app-page-tur...dev.js gzip 303 kB 303 kB
app-page-tur..prod.js gzip 161 kB 161 kB
app-page.run...dev.js gzip 303 kB 303 kB
app-page.run..prod.js gzip 161 kB 161 kB
app-route-ex...dev.js gzip 69.4 kB 69.4 kB
app-route-ex..prod.js gzip 48.2 kB 48.2 kB
app-route-tu...dev.js gzip 69.5 kB 69.5 kB
app-route-tu..prod.js gzip 48.2 kB 48.2 kB
app-route-tu...dev.js gzip 69.1 kB 69.1 kB
app-route-tu..prod.js gzip 48 kB 48 kB
app-route.ru...dev.js gzip 69 kB 69 kB
app-route.ru..prod.js gzip 48 kB 48 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 42.5 kB 42.5 kB
pages-api-tu..prod.js gzip 32.3 kB 32.3 kB
pages-api.ru...dev.js gzip 42.5 kB 42.5 kB
pages-api.ru..prod.js gzip 32.3 kB 32.3 kB
pages-turbo....dev.js gzip 51.8 kB 51.8 kB
pages-turbo...prod.js gzip 38.8 kB 38.8 kB
pages.runtim...dev.js gzip 51.8 kB 51.8 kB
pages.runtim..prod.js gzip 38.8 kB 38.8 kB
server.runti..prod.js gzip 62.3 kB 62.3 kB
Total 2.73 MB 2.73 MB ✅ -1 B

@nextjs-bot nextjs-bot added the Turbopack Related to Turbopack with Next.js. label Jan 22, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 22, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing mischnic/flight-nav-tests (7cfe0f6) with canary (ea81858)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mischnic mischnic changed the title Add deployment-id version of test/e2e/app-dir/segment-cache/deployment-skew/ Fix chunk loading when using __turbopack_load_by_url__ with query Jan 23, 2026
@mischnic mischnic requested a review from sokra January 23, 2026 09:13
@mischnic mischnic force-pushed the mischnic/flight-nav-tests branch from 1ba5af3 to 0a673e6 Compare January 23, 2026 09:19
@mischnic mischnic force-pushed the mischnic/flight-nav-tests branch from 0a673e6 to 831dfb2 Compare January 23, 2026 10:31
@mischnic mischnic force-pushed the mischnic/flight-nav-tests branch from 831dfb2 to 7cfe0f6 Compare January 23, 2026 11:13
Comment on lines 377 to 384
function getPathFromScript(
chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript
): ChunkPath | ChunkListPath {
if (typeof chunkScript === 'string') {
return chunkScript as ChunkPath | ChunkListPath
}
const chunkUrl =
typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'
? TURBOPACK_NEXT_CHUNK_URLS.pop()!
: chunkScript.getAttribute('src')!
const chunkUrl = chunkScript.src!
const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to report that this also finally removes this stateful .pop call from the seemingly pure function getPathFromScript

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants