max-mapper / max-mapper/elementary-electron
i got an error when runing the tutorials
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 231
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
I get this error when i run electron app.js but when i run electron index.html everything works fine
i got this in my app.js file
var electron = require('electron')
electron.app.on('ready', function () {
var mainWindow = new electron.BrowserWindow({width: 600, height: 800})
mainWindow.loadURL('file://' + __dirname + '/index.html')
})
App threw an error when running
[TypeError: Cannot read property 'on' of undefined]
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: Cannot read property 'on' of undefined
at Object.<anonymous> (/home/jose/electron/app.js:3:13)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at loadApplicationPackage (/usr/local/lib/node_modules/electron-prebuilt/dist/resources/default_app/main.js:257:23)
at Object.<anonymous> (/usr/local/lib/node_modules/electron-prebuilt/dist/resources/default_app/main.js:289:5)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app.js and reproduce the failure using electron app.js; compare that entry point with the working electron index.html command and the Electron API used in the tutorial. Done means the tutorial's app.js command runs without the reported exception and loads index.html as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100