You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I am not mistaken,It seems that the globalThis.WebSocket reference isn’t functioning as expected in Node.js version 22.4.0 and later. This issue might be due to changes in how Node handles globalThis.WebSocket.
Conditional Loading of WebSocket: If globalThis.WebSocket is undefined, we can manually require the WebSocket module: if (typeof globalThis.WebSocket === 'undefined') { globalThis.WebSocket = require('ws'); }
Check for Updates or If globalThis.WebSocket continues to behave unexpectedly, consider using an alternative library or directly relying on the ws package for establishing WebSocket connections.
See https://nodejs.org/api/globals.html#websocket
The if statement in api.js globalThis.WebSocket doesn't work as intended in recent node versions.
The text was updated successfully, but these errors were encountered: