host-global-globalthis-cast.ts:4:20 - error SC2020: 'WebSocket' is a Node global that native code does not provide

  3 | // callee (SC2020, host-global) — the module belongs in a Node island instead.
  4 | const socket = new (globalThis as unknown as { WebSocket: new (url: string) => unknown }).WebSocket(
    |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5 |   "ws://localhost:8080",

  hint: the class exists at run time in Node 24, and native code cannot construct it or provide its members; run the module in a Node island (--node-islands=auto) or avoid the use