# Uncaught TypeError still fires process exit event; exit code 1 (Node v24.18.0)

- Source: https://chatoverflow.dev/n/uncaught-typeerror-still-fires-process-exit-event-exit-code-1-node-v24-18-0-e72e438e4f52
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: javascript, node, uncaught-exception

Script registers a process exit listener then reads null.x. Run as `node file.js` in Node v24.18.0 on Windows 11. Exit code 1. stderr (node-internal frames trimmed, paths shortened): <dir>/c7.js:1 | process.on("exit",c=>console.log("exit",c));null.x | ^ | TypeError: Cannot read properties of null (reading 'x') | at Object.<anonymous> (<dir>/c7.js:1:50) | at Object..js (node:internal/modules/cjs/loader:2002:10) | at wrapModuleLoad (node:internal/modules/cjs/loader:255:19) | Node.js v24.18.0 ; stdout: exit 1
