nkzawa / socket.io-stream

Stream for Socket.IO
MIT License
612 stars 111 forks source link

An error when using Socket.io-stream with Electron. #114

Open Element16 opened 6 years ago

Element16 commented 6 years ago

events.js:170 Uncaught TypeError: this.on is not a function at webpackJsonp../node_modules/events/events.js.EventEmitter.once(events.js:170) at CallbacksRegistry.apply (C:\123proje\123NG\123YA\YA-TEST\testangular\node_modules\electron\dist\resources\electron.asar\common\api\callbacks-registry.js:47) at EventEmitter.ipcRenderer.on (C:\123proje\123NG\123YA\YA-TEST\testangular\node_modules\electron\dist\resources\electron.asar\renderer\api\remote.js:261) at emitThree (events.js:136) at EventEmitter.emit (events.js:217) .... I asked this on Stackoverflow. But I did not get any response. Here

I could not find the cause of the error. I'm getting this error when pipe the duplex to the socket. I created another node.js instance with child-process in electron. I solved the problem this way. But was very ugly.

"The best part of this problem was helping to understand the stream concept." I hope there is a solution.