GlobalRegistrator.register();
fails when Node version is v18.18.2 or higher.
#1140
Labels
bug
Something isn't working
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:
The text was updated successfully, but these errors were encountered: