I compiled an executable with nexe with this command: nexe ./output/index.js --build windows-x64-14.5.0 --cwd "C:..." --enableNodeCli
. Unfortunately, the exe crashes when I start it and I don’t know how to look at any error messages.
I tried to write crash logs to a file:
main()
.then(() => {})
.catch((error: Error) =>
writeFile("error-log.txt", error.message, function (err) {
console.log(err?.message);
})
);
process.on("uncaughtException", (error: Error) => {
writeFile("error-log.txt", error.message, function (err) {
console.log(err?.message);
});
});
But this does not seem to write anything. I also looked around in Windows Event Viewer but I could not find anything.