Closed psalkowski closed 4 years ago
I have found the solution. We need to import https://www.npmjs.com/package/ws and make it global. I did that via webpack by adding plugin:
plugins: [
new webpack.ProvidePlugin({
WebSocket: 'ws'
}),
],
Hi,
How to use websocket client when running nodejs process? I'm creating daemon that will communicate via websocket (sending commands from GUI to daemon). Is there any way to use this library for that?
As far as I tested, it throws error on windows is not defined. I have found some workaround here: https://github.com/adonisjs/adonis-websocket-client/issues/67#issuecomment-595994360 but then I receive another issue:
WebSocket is not defined
.