Reverts vercel/turbo#7417
CI of next.js failed:
https://github.com/vercel/next.js/pull/62263#issuecomment-1953453518
<details>
<summary>CI failure</summary>
## Failing test suites <!--20914615487-->
Commit: 3b35c10775c95136547b2f03248c9fafeaba9d01
`TURBOPACK=1 pnpm test
test/integration/no-page-props/test/index.test.js` (turbopack)
- Error no pageProps > dev mode > should navigate between pages
correctly
<details>
<summary>Expand output</summary>
● Error no pageProps › dev mode › should navigate between pages
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."
44 | })
45 |
> 46 | it('should navigate between pages correctly', async () => {
| ^
47 | const browser = await webdriver(appPort, '/')
48 |
49 | await browser.eval('window.beforeNav = "hi"')
at it (integration/no-page-props/test/index.test.js:46:3)
at runTests (integration/no-page-props/test/index.test.js:90:5)
at describe (integration/no-page-props/test/index.test.js:83:3)
at Object.describe (integration/no-page-props/test/index.test.js:82:1)
</details>
Read more about building and testing Next.js in
[contributing.md](https://github.com/vercel/next.js/blob/canary/contributing.md).
`TURBOPACK=1 pnpm test
test/integration/next-image-new/base-path/test/index.test.js`
(turbopack)
- Image Component basePath Tests > dev mode > should update the image on
src change
- Image Component basePath Tests > dev mode > should show invalid src
error
- Image Component basePath Tests > dev mode > should correctly ignore
prose styles
<details>
<summary>Expand output</summary>
● Image Component basePath Tests › dev mode › should update the image on
src change
TIMED OUT: /test\.png/
http://localhost:43027/docs/_next/image?url=%2Ftest.jpg&w=828&q=75
undefined
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-new/base-path/test/index.test.js:97:7)
● Image Component basePath Tests › dev mode › should show invalid src
error
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
143 | const browser = await webdriver(appPort, '/docs/invalid-src')
144 |
> 145 | expect(await hasRedbox(browser)).toBe(true)
| ^
146 | expect(await getRedboxHeader(browser)).toContain(
147 | 'Invalid src prop (https://google.com/test.png) on `next/image`,
hostname "google.com" is not configured under images in your
`next.config.js`'
148 | )
at Object.toBe
(integration/next-image-new/base-path/test/index.test.js:145:40)
● Image Component basePath Tests › dev mode › should correctly ignore
prose styles
TIMED OUT: /result-correct/
undefined
Error: Image not ready
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-new/base-path/test/index.test.js:172:7)
</details>
Read more about building and testing Next.js in
[contributing.md](https://github.com/vercel/next.js/blob/canary/contributing.md).
`pnpm test-start test/e2e/app-dir/navigation/navigation.test.ts`
- app dir - navigation > query string > should handle unicode search
params
<details>
<summary>Expand output</summary>
● app dir - navigation › query string › should handle unicode search
params
request.response: Target page, context or browser has been closed
37 | const browser = await next.browser('/search-params?name=名')
38 | async function requestHandler(req: Request) {
> 39 | const res = await req.response()
| ^
40 | if (!res) return
41 |
42 | requests.push({
at response (e2e/app-dir/navigation/navigation.test.ts:39:33)
at cb (lib/browsers/playwright.ts:234:51)
at Page.forEach (lib/browsers/playwright.ts:234:35)
</details>
Read more about building and testing Next.js in
[contributing.md](https://github.com/vercel/next.js/blob/canary/contributing.md).
`TURBOPACK=1 pnpm test
test/integration/next-image-legacy/base-path/test/index.test.ts`
(turbopack)
- Image Component basePath Tests > dev mode > should work with
layout-intrinsic so resizing window maintains image aspect ratio
- Image Component basePath Tests > dev mode > should work with
layout-responsive so resizing window maintains image aspect ratio
- Image Component basePath Tests > dev mode > should work with
layout-fill to fill the parent and stretch with viewport
- Image Component basePath Tests > dev mode > should work with sizes and
automatically use layout-responsive
- Image Component basePath Tests > dev mode > should show missing src
error
- Image Component basePath Tests > dev mode > should show invalid src
error
- Image Component basePath Tests > dev mode > should show invalid src
error when protocol-relative
<details>
<summary>Expand output</summary>
● Image Component basePath Tests › dev mode › should work with
layout-intrinsic so resizing window maintains image aspect ratio
TIMED OUT: success
undefined
Error: expect(received).toBe(expected) // Object.is equality
Expected: "/docs/_next/image?url=%2Fdocs%2Fwide.png&w=3840&q=75"
Received:
":image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-legacy/base-path/test/index.test.ts:165:7)
● Image Component basePath Tests › dev mode › should work with
layout-responsive so resizing window maintains image aspect ratio
TIMED OUT: success
undefined
Error: expect(received).toBe(expected) // Object.is equality
Expected: "/docs/_next/image?url=%2Fdocs%2Fwide.png&w=3840&q=75"
Received:
":image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-legacy/base-path/test/index.test.ts:206:7)
● Image Component basePath Tests › dev mode › should work with
layout-fill to fill the parent and stretch with viewport
TIMED OUT: success
undefined
Error: expect(received).toBe(expected) // Object.is equality
Expected: "/docs/_next/image?url=%2Fdocs%2Fwide.png&w=3840&q=75"
Received:
":image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-legacy/base-path/test/index.test.ts:288:7)
● Image Component basePath Tests › dev mode › should work with sizes and
automatically use layout-responsive
TIMED OUT: success
undefined
Error: expect(received).toBe(expected) // Object.is equality
Expected: "/docs/_next/image?url=%2Fdocs%2Fwide.png&w=3840&q=75"
Received:
":image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-legacy/base-path/test/index.test.ts:339:7)
● Image Component basePath Tests › dev mode › should show missing src
error
TIMED OUT: /Image is missing required "src" property/gm
undefined
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous>
(integration/next-image-legacy/base-path/test/index.test.ts:380:7)
● Image Component basePath Tests › dev mode › should show invalid src
error
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
386 | const browser = await webdriver(appPort, '/docs/invalid-src')
387 |
> 388 | expect(await hasRedbox(browser)).toBe(true)
| ^
389 | expect(await getRedboxHeader(browser)).toContain(
390 | 'Invalid src prop (https://google.com/test.png) on `next/image`,
hostname "google.com" is not configured under images in your
`next.config.js`'
391 | )
at Object.toBe
(integration/next-image-legacy/base-path/test/index.test.ts:388:40)
● Image Component basePath Tests › dev mode › should show invalid src
error when protocol-relative
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
398 | )
399 |
> 400 | expect(await hasRedbox(browser)).toBe(true)
| ^
401 | expect(await getRedboxHeader(browser)).toContain(
402 | 'Failed to parse src "//assets.example.com/img.jpg" on
`next/image`, protocol-relative URL (//) must be changed to an absolute
URL (http:// or https://)'
403 | )
at Object.toBe
(integration/next-image-legacy/base-path/test/index.test.ts:400:40)
</details>
Read more about building and testing Next.js in
[contributing.md](https://github.com/vercel/next.js/blob/canary/contributing.md).
`TURBOPACK=1 pnpm test-dev test/development/basic/next-dynamic.test.ts`
(turbopack)
- basic next/dynamic usage, basePath: "" with "document.getInitialProps"
compiler > document.getInitialProps > Dynamic import > custom loading >
should render the component on client side
- basic next/dynamic usage, basePath: "" with "swc" compiler > swc >
Dynamic import > custom loading > should render the component on client
side
- basic next/dynamic usage, basePath: "/docs" with "swc" compiler > swc
> Dynamic import > custom loading > should render the component on
client side
<details>
<summary>Expand output</summary>
● basic next/dynamic usage, basePath: "" with "swc" compiler › swc ›
Dynamic import › custom loading › should render the component on client
side
TIMED OUT: /Hello World 1/
LOADING{"props":{"pageProps":{}},"page":"/dynamic/no-ssr-custom-loading","query":{},"buildId":"development","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}
undefined
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous> (development/basic/next-dynamic.test.ts:302:17)
● basic next/dynamic usage, basePath: "/docs" with "swc" compiler › swc
› Dynamic import › custom loading › should render the component on
client side
TIMED OUT: /Hello World 1/
LOADING{"props":{"pageProps":{}},"page":"/dynamic/no-ssr-custom-loading","query":{},"buildId":"development","assetPrefix":"/docs","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}
undefined
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous> (development/basic/next-dynamic.test.ts:302:17)
● basic next/dynamic usage, basePath: "" with "document.getInitialProps"
compiler › document.getInitialProps › Dynamic import › custom loading ›
should render the component on client side
TIMED OUT: /Hello World 1/
LOADING{"props":{"pageProps":{}},"page":"/dynamic/no-ssr-custom-loading","query":{},"buildId":"development","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}
undefined
636 |
637 | if (hardError) {
> 638 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content +
'\n\n' + lastErr)
| ^
639 | }
640 | return false
641 | }
at check (lib/next-test-utils.ts:638:11)
at Object.<anonymous> (development/basic/next-dynamic.test.ts:302:17)
</details>
Read more about building and testing Next.js in
[contributing.md](https://github.com/vercel/next.js/blob/canary/contributing.md).
</details>
Closes PACK-2541