I’m unable to hook the process uncaught exception method built into node.js. Seems to me like this is a type definition issue.
In my testing you can bump @types/node but you end up breaking other dependancies and the app won’t start. There is an issue under the electron repo that has been open since 2017
How to reproduce? Use this in the main.ts file and you’ll see TypeScript does not like the first argument.
process.on('uncaughtException', (err) => {
// Do something here
});
FWIW I’m going to be using this workaround for now.