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

[Bug?]: Tests for Node 20 are Broken #1058

Closed
2 tasks done
ryansolid opened this issue Sep 11, 2023 · 2 comments · Fixed by #1085
Closed
2 tasks done

[Bug?]: Tests for Node 20 are Broken #1058

ryansolid opened this issue Sep 11, 2023 · 2 comments · Fixed by #1085
Labels
bug Something isn't working

Comments

@ryansolid
Copy link
Member

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The tests fail with:

TypeError [ERR_INVALID_RETURN_PROPERTY_VALUE]: Expected array buffer, or typed array to be returned for the "source" from the "transformSource" function but got type object.
at new NodeError (node:internal/errors:405:5)
at assertBufferSource (node:internal/modules/esm/translators:84:9)
at stringify (node:internal/modules/esm/translators:94:3)
at createCJSModuleWrap (node:internal/modules/esm/translators:218:12)
at ModuleLoader. (node:internal/modules/esm/translators:266:10)
at callTranslator (node:internal/modules/esm/loader:265:14)
at ModuleLoader. (node:internal/modules/esm/loader:269:24)
at new ModuleJob (node:internal/modules/esm/module_job:65:26)
at #createModuleJob (node:internal/modules/esm/loader:282:17)

Expected behavior 🤔

The tests should pass

Steps to reproduce 🕹

Run pnpm test:all

Context 🔦

For some reason seemingly unrelated to the PR where they broke tests stopped working in Node 20. Going back to previous commits and re-installing does not appear to fix the issue. It is as if some non-locked down dependency broke. I have no idea what is causing it.

Your environment 🌎

No response

@ryansolid ryansolid added the bug Something isn't working label Sep 11, 2023
@edivados
Copy link
Contributor

edivados commented Sep 12, 2023

Edit 2: Ok! Got it to work on 20.6.x by converting bin.cjs to esm. I am back at thinking it is a weird regression on node's side. Debugger was showing that require on sade was triggering the error... but only on the tests... 😕

Edit: nvm still fails with 20.6.1 so I don't know...

The issue is probably related to Node 20.6.0. With Node 20.5.1 the tests work.
Just a guess... nodejs/node#49497 apparently broke a lot of things.

@edivados
Copy link
Contributor

@ryansolid The tests work again on Node 20.x. Just updated playwright to the most recent version 1.38.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants