TypeError: Cannot read property 'prototype' of undefined
subramanya9112 opened this issue · 3 comments
subramanya9112 commented
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
I have no idea. It should work just fine under plain node.js though.
subramanya9112 commented
No, I was using with react. I tried with plain node and it working fine.
mscdex commented
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.