mscdex/cap

TypeError: Cannot read property 'prototype' of undefined

subramanya9112 opened this issue · 3 comments

  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.

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

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

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.