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
{{ message }}
This repository was archived by the owner on Dec 3, 2021. It is now read-only.
I tried using "robust-websocket" with a Node.js application but it doesn't work. The error message is:
D:\dev\projects\temp\socket-chat-example\node_modules\robust-websocket\robust-websocket.js:7
module.exports = factory(global, navigator)
^
ReferenceError: navigator is not defined
at realWs.close (D:\dev\projects\temp\socket-chat-example\node_modules\robust-websocket\robust-websocket.js:7:38)
at Object. (D:\dev\projects\temp\socket-chat-example\node_modules\robust-websocket\robust-websocket.js:12:3)
The navigator object is only available in browsers and I read that "robust-websocket" has been built for browsers but couldn't you use the same code in Node.js when ws is available?
I tried using "robust-websocket" with a Node.js application but it doesn't work. The error message is:
The navigator object is only available in browsers and I read that "robust-websocket" has been built for browsers but couldn't you use the same code in Node.js when ws is available?
I am thinking of something like this: