Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(test): run all tests against node@21 #57057

Draft
wants to merge 3 commits into
base: canary
Choose a base branch
from

Conversation

styfle
Copy link
Member

@styfle styfle commented Oct 19, 2023

This draft is testing to see if node@21 passes or fails our existing tests.

@ijjk ijjk added Font (next/font) Related to Next.js Font Optimization. created-by: Next.js team PRs by the Next.js team. labels Oct 19, 2023
@styfle styfle changed the title test against node@21 chore(test): run all tests against node@21 Oct 19, 2023
@ijjk
Copy link
Member

ijjk commented Oct 19, 2023

Failing test suites

Commit: 0e48812

pnpm test test/integration/scss/test/dev-css-handling.test.js

  • Has CSS in computed styles in Development > should have CSS for page
Expand output

● Has CSS in computed styles in Development › should have CSS for page

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `Has CSS in computed styles in Development should have CSS for page 1`

Snapshot: "rgb(0, 0, 255)"
Received: null

  33 |         `window.getComputedStyle(document.querySelector('.blue-text')).color`
  34 |       )
> 35 |       expect(currentColor).toMatchInlineSnapshot(`"rgb(0, 0, 255)"`)
     |                            ^
  36 |     } finally {
  37 |       if (browser) {
  38 |         await browser.close()

  at Object.<anonymous> (integration/scss/test/dev-css-handling.test.js:35:28)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/scss-modules/test/dynamic-route.test.js

  • Catch-all Route CSS Module Usage > production mode > should have compiled successfully
  • Catch-all Route CSS Module Usage > production mode > should apply styles correctly
  • Catch-all Route CSS Module Usage > production mode > should've emitted a single CSS file
  • Dynamic Route CSS Module Usage > production mode > should have compiled successfully
  • Dynamic Route CSS Module Usage > production mode > should've emitted a single CSS file
  • Dynamic Route CSS Module Usage > production mode > should apply styles correctly
Expand output

● Dynamic Route CSS Module Usage › production mode › should have compiled successfully

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

Expected: 0
Received: 1

  28 |
  29 |     it('should have compiled successfully', () => {
> 30 |       expect(code).toBe(0)
     |                    ^
  31 |       expect(stdout).toMatch(/Compiled successfully/)
  32 |     })
  33 |

  at Object.<anonymous> (integration/scss-modules/test/dynamic-route.test.js:30:20)

● Dynamic Route CSS Module Usage › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/dynamic-route-module/.next/static/css'

● Dynamic Route CSS Module Usage › production mode › should apply styles correctly

page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:42207/post-1
=========================== logs ===========================
navigating to "http://localhost:42207/post-1", waiting until "load"
============================================================

  215 |       this.activeTrace = encodeURIComponent(url)
  216 |     }
> 217 |     await page.goto(url, { waitUntil: 'load' })
      |                ^
  218 |   }
  219 |
  220 |   back(options): BrowserInterface {

  at BrowserInterface.loadPage (lib/browsers/playwright.ts:217:16)
  at webdriver (lib/next-webdriver.ts:127:3)
  at Object.<anonymous> (integration/scss-modules/test/dynamic-route.test.js:49:23)

● Catch-all Route CSS Module Usage › production mode › should have compiled successfully

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

Expected: 0
Received: 1

  78 |
  79 |     it('should have compiled successfully', () => {
> 80 |       expect(code).toBe(0)
     |                    ^
  81 |       expect(stdout).toMatch(/Compiled successfully/)
  82 |     })
  83 |

  at Object.<anonymous> (integration/scss-modules/test/dynamic-route.test.js:80:20)

● Catch-all Route CSS Module Usage › production mode › should apply styles correctly

page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:34151/post-1
=========================== logs ===========================
navigating to "http://localhost:34151/post-1", waiting until "load"
============================================================

  215 |       this.activeTrace = encodeURIComponent(url)
  216 |     }
> 217 |     await page.goto(url, { waitUntil: 'load' })
      |                ^
  218 |   }
  219 |
  220 |   back(options): BrowserInterface {

  at BrowserInterface.loadPage (lib/browsers/playwright.ts:217:16)
  at webdriver (lib/next-webdriver.ts:127:3)
  at Object.<anonymous> (integration/scss-modules/test/dynamic-route.test.js:85:23)

● Catch-all Route CSS Module Usage › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/catch-all-module/.next/static/css'

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/next-dynamic-css/test/index.test.js

  • next/dynamic > dev mode > should load page correctly
Expand output

● next/dynamic › dev mode › should load page correctly

thrown: "Exceeded timeout of 60000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  16 |
  17 | function runTests() {
> 18 |   it('should load page correctly', async () => {
     |   ^
  19 |     const browser = await webdriver(appPort, '/')
  20 |
  21 |     expect(

  at runTests (integration/next-dynamic-css/test/index.test.js:18:3)
  at integration/next-dynamic-css/test/index.test.js:41:5
  at integration/next-dynamic-css/test/index.test.js:34:3
  at Object.<anonymous> (integration/next-dynamic-css/test/index.test.js:33:1)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/scss/test/scss-loader-handling.test.js

  • SCSS Support loader handling > CSS URL via file-loader > should compile successfully
  • SCSS Support loader handling > CSS URL via file-loader > should've emitted expected files
  • SCSS Support loader handling > CSS URL via file-loader and asset prefix (1) > should compile successfully
  • SCSS Support loader handling > CSS URL via file-loader and asset prefix (1) > should've emitted expected files
  • SCSS Support loader handling > CSS URL via file-loader and asset prefix (2) > should compile successfully
  • SCSS Support loader handling > CSS URL via file-loader and asset prefix (2) > should've emitted expected files
  • SCSS Support loader handling > CSS URL via file-loader sass partial > should compile successfully
  • SCSS Support loader handling > CSS URL via file-loader sass partial > should've emitted expected files
  • SCSS Support loader handling > Data Urls > should compile successfully
  • SCSS Support loader handling > Data Urls > should've emitted expected files
  • SCSS Support loader handling > External imports > should compile successfully
  • SCSS Support loader handling > External imports > should've emitted expected files
  • SCSS Support loader handling > Preprocessor loader order > should compile successfully
Expand output

● SCSS Support loader handling › CSS URL via file-loader › should compile successfully

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

Expected: 0
Received: 1

  21 |         })
  22 |         // eslint-disable-next-line
> 23 |         expect(code).toBe(0)
     |                      ^
  24 |         // eslint-disable-next-line
  25 |         expect(stdout).toMatch(/Compiled successfully/)
  26 |       }

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:23:22)

● SCSS Support loader handling › CSS URL via file-loader › should've emitted expected files

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/url-global/.next/static/css'

● SCSS Support loader handling › CSS URL via file-loader sass partial › should compile successfully

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

Expected: 0
Received: 1

  71 |         })
  72 |         // eslint-disable-next-line
> 73 |         expect(code).toBe(0)
     |                      ^
  74 |         // eslint-disable-next-line
  75 |         expect(stdout).toMatch(/Compiled successfully/)
  76 |       }

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:73:22)

● SCSS Support loader handling › CSS URL via file-loader sass partial › should've emitted expected files

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/url-global-partial/.next/static/css'

● SCSS Support loader handling › CSS URL via file-loader and asset prefix (1) › should compile successfully

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

Expected: 0
Received: 1

  123 |         })
  124 |         // eslint-disable-next-line
> 125 |         expect(code).toBe(0)
      |                      ^
  126 |         // eslint-disable-next-line
  127 |         expect(stdout).toMatch(/Compiled successfully/)
  128 |       }

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:125:22)

● SCSS Support loader handling › CSS URL via file-loader and asset prefix (1) › should've emitted expected files

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/url-global-asset-prefix-1/.next/static/css'

● SCSS Support loader handling › CSS URL via file-loader and asset prefix (2) › should compile successfully

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

Expected: 0
Received: 1

  173 |         })
  174 |         // eslint-disable-next-line
> 175 |         expect(code).toBe(0)
      |                      ^
  176 |         // eslint-disable-next-line
  177 |         expect(stdout).toMatch(/Compiled successfully/)
  178 |       }

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:175:22)

● SCSS Support loader handling › CSS URL via file-loader and asset prefix (2) › should've emitted expected files

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/url-global-asset-prefix-2/.next/static/css'

● SCSS Support loader handling › Data Urls › should compile successfully

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

Expected: 0
Received: 1

  223 |         })
  224 |         // eslint-disable-next-line
> 225 |         expect(code).toBe(0)
      |                      ^
  226 |         // eslint-disable-next-line
  227 |         expect(stdout).toMatch(/Compiled successfully/)
  228 |       }

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:225:22)

● SCSS Support loader handling › Data Urls › should've emitted expected files

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/data-url/.next/static/css'

● SCSS Support loader handling › External imports › should compile successfully

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

Expected: 0
Received: 1

  256 |         })
  257 |         // eslint-disable-next-line
> 258 |         expect(code).toBe(0)
      |                      ^
  259 |         // eslint-disable-next-line
  260 |         expect(stdout).toMatch(/Compiled successfully/)
  261 |       }

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:258:22)

● SCSS Support loader handling › External imports › should've emitted expected files

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/external-url/.next/static/css'

● SCSS Support loader handling › Preprocessor loader order › should compile successfully

expect(received).toMatch(expected)

Expected pattern: /Compiled successfully/
Received string:  "   Linting and checking validity of types ...
   Creating an optimized production build ...
"

  289 |         })
  290 |         // eslint-disable-next-line
> 291 |         expect(stdout).toMatch(/Compiled successfully/)
      |                        ^
  292 |       }
  293 |     )
  294 |   })

  at Object.<anonymous> (integration/scss/test/scss-loader-handling.test.js:291:24)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/scss/test/basic-global-support.test.js

  • Basic Global Support scss > production mode > should compile successfully
  • Basic Global Support scss > production mode > should've emitted a single CSS file
  • Basic Global Support with src/ dir > production mode > should compile successfully
  • Basic Global Support with src/ dir > production mode > should've emitted a single CSS file
  • Basic Module Include Paths Support > production mode > should compile successfully
  • Basic Module Include Paths Support > production mode > should've emitted a single CSS file
  • Basic Module Prepend Data Support > production mode > should compile successfully
  • Basic Module Prepend Data Support > production mode > should've emitted a single CSS file
  • CSS Import from node_modules > production mode > should fail the build
  • Good CSS Import from node_modules > production mode > should compile successfully
  • Good CSS Import from node_modules > production mode > should've emitted a single CSS file
  • Good Nested CSS Import from node_modules > production mode > should compile successfully
  • Good Nested CSS Import from node_modules > production mode > should've emitted a single CSS file
  • Multi Global Support (reversed) > production mode > should compile successfully
  • Multi Global Support (reversed) > production mode > should've emitted a single CSS file
  • Multi Global Support > production mode > should compile successfully
  • Multi Global Support > production mode > should've emitted a single CSS file
  • Nested @import() Global Support > production mode > should compile successfully
  • Nested @import() Global Support > production mode > should've emitted a single CSS file
Expand output

● Basic Global Support scss › production mode › should compile successfully

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

Expected: 0
Received: 1

  19 |         stdout: true,
  20 |       })
> 21 |       expect(code).toBe(0)
     |                    ^
  22 |       expect(stdout).toMatch(/Compiled successfully/)
  23 |     })
  24 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:21:20)

● Basic Global Support scss › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/single-global/.next/static/css'

● Basic Module Include Paths Support › production mode › should compile successfully

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

Expected: 0
Received: 1

  49 |         stdout: true,
  50 |       })
> 51 |       expect(code).toBe(0)
     |                    ^
  52 |       expect(stdout).toMatch(/Compiled successfully/)
  53 |     })
  54 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:51:20)

● Basic Module Include Paths Support › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/basic-module-include-paths/.next/static/css'

● Basic Module Prepend Data Support › production mode › should compile successfully

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

Expected: 0
Received: 1

  79 |         stdout: true,
  80 |       })
> 81 |       expect(code).toBe(0)
     |                    ^
  82 |       expect(stdout).toMatch(/Compiled successfully/)
  83 |     })
  84 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:81:20)

● Basic Module Prepend Data Support › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/basic-module-prepend-data/.next/static/css'

● Basic Global Support with src/ dir › production mode › should compile successfully

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

Expected: 0
Received: 1

  109 |         stdout: true,
  110 |       })
> 111 |       expect(code).toBe(0)
      |                    ^
  112 |       expect(stdout).toMatch(/Compiled successfully/)
  113 |     })
  114 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:111:20)

● Basic Global Support with src/ dir › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/single-global-src/.next/static/css'

● Multi Global Support › production mode › should compile successfully

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

Expected: 0
Received: 1

  139 |         stdout: true,
  140 |       })
> 141 |       expect(code).toBe(0)
      |                    ^
  142 |       expect(stdout).toMatch(/Compiled successfully/)
  143 |     })
  144 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:141:20)

● Multi Global Support › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/multi-global/.next/static/css'

● Nested @import() Global Support › production mode › should compile successfully

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

Expected: 0
Received: 1

  170 |         stdout: true,
  171 |       })
> 172 |       expect(code).toBe(0)
      |                    ^
  173 |       expect(stdout).toMatch(/Compiled successfully/)
  174 |     })
  175 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:172:20)

● Nested @import() Global Support › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/nested-global/.next/static/css'

● Multi Global Support (reversed) › production mode › should compile successfully

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

Expected: 0
Received: 1

  204 |         stdout: true,
  205 |       })
> 206 |       expect(code).toBe(0)
      |                    ^
  207 |       expect(stdout).toMatch(/Compiled successfully/)
  208 |     })
  209 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:206:20)

● Multi Global Support (reversed) › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/multi-global-reversed/.next/static/css'

● Good CSS Import from node_modules › production mode › should compile successfully

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

Expected: 0
Received: 1

  235 |         stdout: true,
  236 |       })
> 237 |       expect(code).toBe(0)
      |                    ^
  238 |       expect(stdout).toMatch(/Compiled successfully/)
  239 |     })
  240 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:237:20)

● Good CSS Import from node_modules › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/npm-import/.next/static/css'

● Good Nested CSS Import from node_modules › production mode › should compile successfully

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

Expected: 0
Received: 1

  264 |         stdout: true,
  265 |       })
> 266 |       expect(code).toBe(0)
      |                    ^
  267 |       expect(stdout).toMatch(/Compiled successfully/)
  268 |     })
  269 |

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:266:20)

● Good Nested CSS Import from node_modules › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/npm-import-nested/.next/static/css'

● CSS Import from node_modules › production mode › should fail the build

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

Expected: 0
Received: 1

  294 |       const { code, stderr } = await nextBuild(appDir, [], { stderr: true })
  295 |
> 296 |       expect(code).toBe(0)
      |                    ^
  297 |       expect(stderr).not.toMatch(/Can't resolve '[^']*?nprogress[^']*?'/)
  298 |       expect(stderr).not.toMatch(/Build error occurred/)
  299 |     })

  at Object.<anonymous> (integration/scss/test/basic-global-support.test.js:296:20)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/css/test/css-modules.test.js

  • should handle unresolved files gracefully > production mode > should build correctly
  • should handle unresolved files gracefully > production mode > should have correct file references in CSS output
Expand output

● should handle unresolved files gracefully › production mode › should build correctly

command failed with code 1 signal null
   Linting and checking validity of types ...

 ⚠ The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config
   Creating an optimized production build ...
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Failed to compile.

./pages/another.module.scss
Cannot read properties of undefined (reading 'indexOf')

Import trace for requested module:
./pages/another.module.scss
./pages/another.js

./pages/another.module.scss
Error: resolve-url-loader: CSS error
  PostCSS received undefined instead of CSS string

  83 |     }
  84 |     function encodeError(label, exception) {
> 85 |         return new Error([
     |                ^
  86 |             "resolve-url-loader",
  87 |             ": ",
  88 |             [

  at new Input (../node_modules/.pnpm/[email protected]/node_modules/postcss/lib/input.js:24:13)
  at encodeError (../packages/next/dist/build/webpack/loaders/resolve-url-loader/index.js:85:16)
  at onFailure (../packages/next/dist/build/webpack/loaders/resolve-url-loader/index.js:71:18)
  Import trace for requested module:
  ./pages/another.module.scss
  ./pages/another.js
  > Build failed because of webpack errors
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:296:11)

● should handle unresolved files gracefully › production mode › should have correct file references in CSS output

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/css-fixtures/unresolved-css-url/.next/static/css'

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/scss-modules/test/basic-scss.test.js

  • 3rd Party CSS Module Support > production mode > should have compiled successfully
  • 3rd Party CSS Module Support > production mode > should've emitted a single CSS file
  • 3rd Party CSS Module Support > production mode > should've injected the CSS on server render
  • Basic SCSS Module Support > production mode > should have compiled successfully
  • Basic SCSS Module Support > production mode > should've emitted a single CSS file
  • Basic SCSS Module Support > production mode > should've injected the CSS on server render
  • CSS Module Composes Usage (Basic) > production mode > should have compiled successfully
  • CSS Module Composes Usage (Basic) > production mode > should've emitted a single CSS file
  • CSS Module Composes Usage (External) > production mode > should have compiled successfully
  • CSS Module Composes Usage (External) > production mode > should've emitted a single CSS file
  • Can hot reload CSS Module without losing state > should update CSS color without remounting
  • Has CSS Module in computed styles in Development > should have CSS for page
  • Has CSS Module in computed styles in Production > production mode > should have compiled successfully
  • Has CSS Module in computed styles in Production > production mode > should have CSS for page
Expand output

● Basic SCSS Module Support › production mode › should have compiled successfully

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

Expected: 0
Received: 1

  39 |
  40 |     it('should have compiled successfully', () => {
> 41 |       expect(code).toBe(0)
     |                    ^
  42 |       expect(stdout).toMatch(/Compiled successfully/)
  43 |     })
  44 |

  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:41:20)

● Basic SCSS Module Support › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/basic-module/.next/static/css'

● Basic SCSS Module Support › production mode › should've injected the CSS on server render

FetchError: request to http://localhost:42881/ failed, reason: connect ECONNREFUSED 127.0.0.1:42881

  at ClientRequest.<anonymous> (../node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js:1491:11)

● 3rd Party CSS Module Support › production mode › should have compiled successfully

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

Expected: 0
Received: 1

   97 |
   98 |     it('should have compiled successfully', () => {
>  99 |       expect(code).toBe(0)
      |                    ^
  100 |       expect(stdout).toMatch(/Compiled successfully/)
  101 |     })
  102 |

  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:99:20)

● 3rd Party CSS Module Support › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/3rd-party-module/.next/static/css'

● 3rd Party CSS Module Support › production mode › should've injected the CSS on server render

FetchError: request to http://localhost:42307/ failed, reason: connect ECONNREFUSED 127.0.0.1:42307

  at ClientRequest.<anonymous> (../node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js:1491:11)

● Has CSS Module in computed styles in Development › should have CSS for page

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `Has CSS Module in computed styles in Development should have CSS for page 1`

Snapshot: "rgb(255, 0, 0)"
Received: null

  156 |       `window.getComputedStyle(document.querySelector('#verify-red')).color`
  157 |     )
> 158 |     expect(currentColor).toMatchInlineSnapshot(`"rgb(255, 0, 0)"`)
      |                          ^
  159 |   })
  160 | })
  161 |

  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:158:26)

● Has CSS Module in computed styles in Production › production mode › should have compiled successfully

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

Expected: 0
Received: 1

  181 |
  182 |     it('should have compiled successfully', () => {
> 183 |       expect(code).toBe(0)
      |                    ^
  184 |       expect(stdout).toMatch(/Compiled successfully/)
  185 |     })
  186 |

  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:183:20)

● Has CSS Module in computed styles in Production › production mode › should have CSS for page

page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:42773/
=========================== logs ===========================
navigating to "http://localhost:42773/", waiting until "load"
============================================================

  215 |       this.activeTrace = encodeURIComponent(url)
  216 |     }
> 217 |     await page.goto(url, { waitUntil: 'load' })
      |                ^
  218 |   }
  219 |
  220 |   back(options): BrowserInterface {

  at BrowserInterface.loadPage (lib/browsers/playwright.ts:217:16)
  at webdriver (lib/next-webdriver.ts:127:3)
  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:188:23)

● Can hot reload CSS Module without losing state › should update CSS color without remounting

thrown: "Exceeded timeout of 60000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  210 |   })
  211 |
> 212 |   it('should update CSS color without remounting <input>', async () => {
      |   ^
  213 |     const browser = await webdriver(appPort, '/')
  214 |
  215 |     const desiredText = 'hello world'

  at integration/scss-modules/test/basic-scss.test.js:212:3
  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:198:1)

● CSS Module Composes Usage (Basic) › production mode › should have compiled successfully

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

Expected: 0
Received: 1

  257 |
  258 |     it('should have compiled successfully', () => {
> 259 |       expect(code).toBe(0)
      |                    ^
  260 |       expect(stdout).toMatch(/Compiled successfully/)
  261 |     })
  262 |

  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:259:20)

● CSS Module Composes Usage (Basic) › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/composes-basic/.next/static/css'

● CSS Module Composes Usage (External) › production mode › should have compiled successfully

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

Expected: 0
Received: 1

  294 |
  295 |     it('should have compiled successfully', () => {
> 296 |       expect(code).toBe(0)
      |                    ^
  297 |       expect(stdout).toMatch(/Compiled successfully/)
  298 |     })
  299 |

  at Object.<anonymous> (integration/scss-modules/test/basic-scss.test.js:296:20)

● CSS Module Composes Usage (External) › production mode › should've emitted a single CSS file

ENOENT: no such file or directory, scandir '/root/actions-runner/_work/next.js/next.js/test/integration/scss-fixtures/composes-external/.next/static/css'

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/yarn-pnp/test/with-next-sass.test.ts

  • yarn PnP > should compile and serve the index page correctly with-next-sass
Expand output

● yarn PnP › should compile and serve the index page correctly with-next-sass

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

Expected: 200
Received: 500

  61 |     it(`should compile and serve the index page correctly ${example}`, async () => {
  62 |       const res = await fetchViaHTTP(next.url, testPath)
> 63 |       expect(res.status).toBe(200)
     |                          ^
  64 |
  65 |       const text = await res.text()
  66 |

  at Object.<anonymous> (e2e/yarn-pnp/test/utils.ts:63:26)

Read more about building and testing Next.js in contributing.md.

@@ -9,7 +9,7 @@ RUN apt install unzip wget curl nano htop screen build-essential pkg-config libs

RUN ln $(which python3) /usr/bin/python

RUN curl -sfLS https://install-node.vercel.app/v18.17.0 | bash -s -- -f
RUN curl -sfLS https://install-node.vercel.app/v21 | bash -s -- -f
Copy link
Member

Choose a reason for hiding this comment

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

We could make this come from an env variable so it always installs the same version as defined in the workflow with NODE_LTS_VERSION

Copy link
Member

Choose a reason for hiding this comment

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

this might be risky if we're using apis that available in new nodejs version but not supported in 18. we had similar problem before that we were using api that not supported in 16 but available in 17 or 18

@@ -8,7 +8,7 @@ on:
env:
NAPI_CLI_VERSION: 2.16.2
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21
Copy link
Member

Choose a reason for hiding this comment

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

Nit: 21 is not the LTS version, should we rename the variable to avoid ambiguity?

@@ -146,7 +146,7 @@ jobs:
group: [1, 2, 3, 4, 5]
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.17.0
nodeVersion: 21
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
nodeVersion: 21
nodeVersion: ${{github.env.NODE_LTS_VERSION}}

@@ -211,7 +211,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.17.0
nodeVersion: 21
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
nodeVersion: 21
nodeVersion: ${{github.env.NODE_LTS_VERSION}}

@Ethan-Arrowood
Copy link
Contributor

@balazsorban44 I think this is intentionally a draft pr to test Next.js against the new Node.js version to see what's breaking. See the related Node.js issue in the PR body for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Next.js team PRs by the Next.js team. Font (next/font) Related to Next.js Font Optimization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants