electron-userland / electron-prebuilt-compile

electron-prebuilt with Babel and React built-in
167 stars 50 forks source link

app refuses to define. #69

Closed jcc10 closed 6 years ago

jcc10 commented 6 years ago

I am getting the error:

TypeError: Cannot read property 'on' of undefined

edit: to clarify, the app does not open any windows, it display's a error box and hangs. edit2: it was starting fine with electron.

This supposedly points to the following line of code:

app.on('ready', createMainWindow);

I am importing as

const {app, BrowserWindow, session} = require('electron-prebuilt-compile');

I kind of want to know what I am doing wrong, since there was no notes in the readme I thought that this was a drop-in replacement for the standard electron package that would let me use ES6 scripts to help keep my sanity.

jcc10 commented 6 years ago

I'm a idiot, you are just supposed to use the normal require('electron');