Cant read property 'on' on undefined
See original GitHub issueHi, I am using your updater and I have problem when I import it, it can’t ready properto ‘on’ on undefined on line 35 of index.js.
I was able to fix it by including autoupdater like this:
const electron = require('electron');
const app = electron.remote.app;
const autoUpdater = electron.remote.autoUpdater;
But I would like to know if this is my issue or issue of library. Am I doing something wrong? I have my electron 1.4.7 in devDependecies of project and I don’t have it installed globally.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Resolving TypeError: Cannot Read Property of Undefined ...
What Causes TypeError: Cannot Read Property of Undefined. Undefined means that a variable has been declared but has not been assigned a value....
Read more >Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >Node.js Cannot read property 'on' of undefined
My server.js code : var events = require('events').EventEmitter; var v = function() ...
Read more >Uncaught TypeError : Cannot read properties of undefined
The solution to TypeError: Cannot read properties of undefined ... The root cause of the error is that the declared variable doesn't have...
Read more >How to Avoid the Infamous "Cannot read properties of ...
Interpreting undefined or null as subtypes of all other types can lead to runtime problems. For example, if you try to get the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems that you import electron-simple-updater in the renderer process directly. If you would like to use this library from renderer process you should import it like this: const { remote } = require(‘electron’); const updater = remote.require(‘electron-simple-updater’);
@uvlek what do you mean? This package calls checkForUpdates of built-in electron module internally