segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.54k stars 1.08k forks source link

Error using nightmare with Electron #1603

Open MatheusAThomaz opened 4 years ago

MatheusAThomaz commented 4 years ago

I'm trying to load a web page inside a electron application, but when a call the electron library I'm receiving the following stacktrace:

`Nightmare runner error:

    TypeError: Cannot read property 'on' of undefined
        at Object.<anonymous> (C:\Users\annac\Documents\matheus\xego-delivery\node_modules\nightmare\lib\runner.js:66:4)
        at Object.<anonymous> (C:\Users\annac\Documents\matheus\xego-delivery\node_modules\nightmare\lib\runner.js:652:3)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
        at Function.Module.runMain (module.js:605:10)
        at startup (bootstrap_node.js:167:16)
        at bootstrap_node.js:589:3

`

I want to know if this problem is because I'm using electron with nightmare, and if it is possible I am getting this error.