Can't run the quick start demo?


#1

I followed the quick start guide and can’t get it to run.

I get the error:

A JavaScript error occured in the main process
Uncaught Exception:
TypeError: Cannot read property ‘on’ of undefined
at Object. (/Users/Matt/Desktop/electron-quick-start-master/main.js:33:4)
at Module._compile (module.js:413:34)
at Object.Module._extensions…js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at loadApplicationPackage (/usr/local/lib/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:253:23)
at Object. (/usr/local/lib/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:293:5)
at Module._compile (module.js:413:34)
at Object.Module._extensions…js (module.js:422:10)
at Module.load (module.js:357:32)

The code is the electron-quick-start-master that I cloned.
I cd’d into the directory and ran the command “electron .”

Any idea why it’s not working?


#2

Can you link to the repo you’re cloning from?


#3

#4

Looks similar to this issue here: Electron command does nothing

Just to be sure, you’ve done npm install && npm start, and don’t have a conflicting global version of electron or electron-prebuilt, do you?


#5

Running npm install && npm start and electron . both produce the same error above. How do I fix it?


#6

The link doesn’t solve my problem.

Still broken.


#7

I fixed it by running
sudo find / -name "electron"
and deleting all instances.


#8

I’m having the same issue, but I edited the files in the quick-start-demo with the ones of my project, I can’t find where the problem is :confused: