Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug\index.js:74 Uncaught TypeError: Cannot read property 'on' of undefined #63

Open
juancresc opened this issue May 26, 2018 · 5 comments
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted

Comments

@juancresc
Copy link

juancresc commented May 26, 2018

Issuehunt badges

I'm getting an error with versions:

Initialize code:

const {app, BrowserWindow} = require('electron');
require('electron-debug')({showDevTools: true});
let win;
app.on('ready', () => {
	win = new BrowserWindow();
});

Error trace:


C:\Users\Administracion\Desktop\manu\Sistemas\recargas_ussd\node_modules\electron-debug\index.js:74 Uncaught TypeError: Cannot read property 'on' of undefined
    at module.exports.opts (C:\Users\Administracion\Desktop\manu\Sistemas\recargas_ussd\node_modules\electron-debug\index.js:74:5)
    at file:///C:/Users/Administracion/Desktop/manu/Sistemas/recargas_ussd/assets/js/script.js:22:26]

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

@sindresorhus
Copy link
Owner

Do you still see this with Electron 2.0.2?

@daniel-kun
Copy link

@sindresorhus Jup! I still see it in Electron 2.0.2, Node v8.11.2, Windows.
Additional info: I use electron-compile to be able to use ES6, maybe this is related.

@afhammad
Copy link

+1

@hasparus
Copy link

I have the same problem:

> cross-env HOT=1 NODE_ENV=development electron ./app/main.development

D:\Git\heck\node_modules\electron-debug\index.js:74
        app.on('browser-window-created', (e, win) => {
           ^

TypeError: Cannot read property 'on' of undefined
    at module.exports.opts (D:\Git\heck\node_modules\electron-debug\index.js:74:5)
    at Object.<anonymous> (D:\Git\heck\heck-app\app\main.development.js:13:28)
    at Object.<anonymous> (D:\Git\heck\heck-app\app\main.development.js:274: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)

@IssueHuntBot
Copy link

@IssueHunt has funded $40.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted
Projects
None yet
Development

No branches or pull requests

6 participants