Open binarykitchen opened 7 years ago
silly me, wrong repo. will do this in https://github.com/websockets/ws
no worries.
sorry, reopening. moving this back here from https://github.com/websockets/ws/issues/1060
i guess it has something to do with the ws-fallback.js file.
we do not have a ws-fallback here. What do you mean?
https://github.com/maxogden/websocket-stream/blob/master/ws-fallback.js
I guess the Opera version is too old, for example in 11.50 you had to enable WebSocket manually to have the WebSocket
object.
@binarykitchen you should download the Opera version that is giving you troubles, open the console and check if there is a global WebSocket
object available.
damn, cannot reproduce this anymore. wish i had noted down the exact opera version.
but still, i wonder what the recommendation is when ws
being null is returned here https://github.com/maxogden/websocket-stream/blob/master/ws-fallback.js ?
maybe throw an exception somewhere saying that "your browser does not support WebSockets" or something like that?
maybe throw an exception somewhere saying that "your browser does not support WebSockets" or something like that?
I think it makes sense.
I got this issue too. when I used wepback4.x to build, and ran it by 'node main.js', this error happened. How to fixed it?
@limjiregister My solution was setting the target: 'node'
in my webpack.config.js
file.
for some exotic browsers i want to support, like opera, i see the
WS is not a constructor
error.do you think you could add a workaround for that? if not, what else would you suggest in my place?