Hard reset not working
See original GitHub issueWhat is the problem
When enabling hard reset (providing an electron path in the options object) and changing the main.js (I changed the width of the window, in this case), Electron crashes and doesn’t reload.
The following output is printed in the console:
(node:12608) UnhandledPromiseRejectionWarning: Error: spawn C:\Users\leont\projects\electron-reload\node_modules\.bin\electron ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
eload\main.js:37:11)
at Object.onceWrapper (events.js:313:26)
at FSWatcher.emit (events.js:223:5)
at FSWatcher.emitWithAll (C:\Users\leont\projects\electron-reload\node_modules\chokidar\index.js:524:8)
at FSWatcher._emit (C:\Users\leont\projects\electron-reload\node_modules\chokidar\index.js:616:8)
at C:\Users\leont\projects\electron-reload\node_modules\chokidar\lib\nodefs-handler.js:370:20
(node:12608) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). (rejection id: 1)
(node:12608) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
So I suppose that it’s just a missing .catch() block somewhere that produces this error.
How to reproduce
Do a basic electron setup with the file setup provided in Writing Your First Electron App, install electron-reload and run it as usual. Also provide the electron path and set hardResetMethod to exit. Then run electron with npm start and change the browser window width and save the file. It should crash now.
Additional information
Node: v12.18.0 OS: Windows Electron: 9.0.4
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
iPhone Force Restart not working
iPhone Force Restart not working · Press and quickly release Volume UP button · Press and quickly release Volume DOWN button · Press...
Read more >Android Factory Reset Not Working? Try These Fixes
Go to Settings > Battery manager > Disable fast boot. · Now, turn off the phone. · Press Volume Down + Power button....
Read more >4 Ways to Fix iPhone Won't Restart/Force Restart Not ...
There is a final way you can try if force restarting is either not working. That is put your iPhone into recovery mode...
Read more >Can't hard reset my phone
If the "Factory Reset" won't work for you, you could have an app or two on the device that is prohibiting it. Try...
Read more >How to Fix Android Wipe Data Factory Reset Not Working?
Hard Reset: When the device does not work properly, it means that you need to change the settings in the device, so only...
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 Free
Top 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

@leontepe
electron: path.join(__dirname, “node_modules”, “electron”, “dist”, “electron.exe”) It works in my environment.
I hope this will help.
Seems to be solved!