A JavaScript error occurred in the main process
See original GitHub issueUncaught Exception:
SyntaxError: Invalid or unexpected token
at Timeout._onTimeout
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
I’m using Electron, and have a file that requires a .jsc
file which requires a .jsc
file. I did use the same Electron to compile these files to bytecode. And the app was working fine for a minute, until this error randomly popped up. And everytime I clicked ok
it popped up again. I had to use Task Manager to kill the process. This was an executable created with electron-builder
.
I probably won’t be able to get a minimum example but maybe this will be useful for future reference.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
A Javascript Error Occurred in the Main Process [Discord]
Corrupt program files – If your program or its settings have gone corrupt, this error and others may be triggered. Deactivated services –...
Read more >How to Fix the 'A JavaScript Error Occurred in the Main ...
Solution 2: Change the Startup Type of the Quality Windows Audio Video Experience Service ... Changing the startup type of the Quality Windows ......
Read more >A JavaScript error occurred in the main process message on ...
A JavaScript error occurred in the main process · 1) Delete the app data folders in %AppData% and %LocalAppData%. · 2) Re-register the...
Read more >A JavaScript Error Occurred in the Main Process Windows 10 ...
Solution: A JavaScript Error Occurred in the Main Process Windows 10 / 11 Fixed.
Read more >Fix 'A JavaScript Error Occurred in the Main Process' Error in ...
Solutions to fix the “A Javascript Error Occurred in the Main Process” Error in Discord: 1. Delete Discord Folders in AppData and LocalAppData...
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
You have to use the exact same executable to compile and to run
.jsc
. This is how v8 caching system work. Any other behavior won’t work, even if you use the exact same [numeric] version of Node and v8 itself.You probably need to alter your app to say:
The first line is necessary so that the Node.js module loader can load JSC files - normally it can’t.