Web socket is not defined

node_modules/moonlink.js/dist/src/entities/Node.js:62 this.socket = new WebSocket(ws${this.secure ? "s" : ""}://${this.address}/${this.pathVersion}/websocket, { ^ ReferenceError: WebSocket is not defined at Node.connect (/home/container/node_modules/moonlink.js/dist/src/entities/Node.js:62:27) at /home/container/node_modules/moonlink.js/dist/src/management/NodeManager.js:28:18 at Map.forEach (<anonymous>) at NodeManager.init (/home/container/node_modules/moonlink.js/dist/src/management/NodeManager.js:27:20) at Manager.init (/home/container/node_modules/moonlink.js/dist/src/core/Manager.js:52:20) at Object.execute (/home/container/events/ready.js:10:22) at Client.<anonymous> (/home/container/index.js:60:48) at Object.onceWrapper (node:events:632:26) at Client.emit (node:events:517:28) at WebSocketManager.triggerClientReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:381:17)
Solution:
oh alr
Jump to solution
2 Replies
1Lucas1.apk
1Lucas1.apk•7d ago
Hello, we are currently using nodejs native Websocket that arrived in recent nodejs versions. Update to v22
Solution
ExoticLegion
ExoticLegion•7d ago
oh alr

Did you find this page helpful?