Closed mdestafadilah closed 1 year ago
you must change this line
nodeCleanup(cleanup)
nodeCleanup({
ctrl_C: "{^C}",
uncaughtException: "Uh oh. Look what happened:"
});
async function exitHandler(evtOrExitCodeOrError: number | string | Error) {
try {
// await async code here
// Optionally: Handle evtOrExitCodeOrError here
} catch (e) {
console.error('EXIT HANDLER ERROR', e);
}
process.exit(isNaN(+evtOrExitCodeOrError) ? 1 : +evtOrExitCodeOrError);
}
[
'beforeExit', 'uncaughtException', 'unhandledRejection',
'SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGILL', 'SIGTRAP',
'SIGABRT','SIGBUS', 'SIGFPE', 'SIGUSR1', 'SIGSEGV',
'SIGUSR2', 'SIGTERM',
].forEach(evt => process.on(evt, exitHandler));
i have't tested... source: https://stackoverflow.com/a/63223515
Should be fixed in the latest version