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

GlobalRegistrator.register(); fails when Node version is v18.18.2 or higher. #1140

Closed
rkireevLT opened this issue Oct 19, 2023 · 0 comments · Fixed by #1142
Closed

GlobalRegistrator.register(); fails when Node version is v18.18.2 or higher. #1140

rkireevLT opened this issue Oct 19, 2023 · 0 comments · Fixed by #1142
Labels
bug Something isn't working

Comments

@rkireevLT
Copy link

Describe the bug
GlobalRegistrator.register(); fails when Node version is v18.18.2 or higher.

To Reproduce
Steps to reproduce the behavior:
Run the code below on Node 18.18.2
import {GlobalRegistrator} from '@happy-dom/global-registrator'; GlobalRegistrator.register();

Expected behavior
The code runs without an error.

Actual behavior
Error thrown:
`node:internal/deps/undici/undici:10194
var MessageEvent = class _MessageEvent extends Event {
^

TypeError: Class extends value does not have valid prototype property undefined
at lib/websocket/events.js (node:internal/deps/undici/undici:10194:52)
at __require (node:internal/deps/undici/undici:4:50)
at lib/websocket/util.js (node:internal/deps/undici/undici:10436:40)
at __require (node:internal/deps/undici/undici:4:50)
at lib/websocket/websocket.js (node:internal/deps/undici/undici:10979:96)
at __require (node:internal/deps/undici/undici:4:50)
at node:internal/deps/undici/undici:11380:28
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/loaders:336:7)
at requireBuiltin (node:internal/bootstrap/loaders:367:14)
at lazyUndici (node:internal/process/pre_execution:237:14)`

Screenshots
N/A

Device:

  • OS: Windows 10 Pro
  • Node v18.18.2
  • happy-dom v12.9.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.

1 participant