mscdex / cap

A cross-platform binding for performing packet capturing with node.js
MIT License
361 stars 45 forks source link

TypeError: Cannot read property 'prototype' of undefined #103

Closed subramanya9112 closed 3 years ago

subramanya9112 commented 3 years ago
  3 | var addon = require('../build/Release/cap.node');
  4 | 
> 5 | addon.Cap.prototype.__proto__ = EventEmitter.prototype;
  6 | addon.Cap.findDevice = addon.findDevice;
  7 | addon.Cap.deviceList = addon.deviceList;

When using cap with react electron, giving "TypeError: Cannot read property 'prototype' of undefined" error.

mscdex commented 3 years ago

I have no idea. It should work just fine under plain node.js though.

subramanya9112 commented 3 years ago

No, I was using with react. I tried with plain node and it working fine.

mscdex commented 3 years ago

I understand, but there's nothing I can do really as I don't use Electron and don't understand why it's having this issue only there.