Use this page to diagnose common setup and runtime errors.
Pass an array with at least one supported event name.
Use uncaughtException, unhandledRejection, or warning.
Remove all other names from the array.
Provide an on() method. Also provide off() or removeListener().
If you set once to true, the package uses once() when it exists.
The package can use on() when once() does not exist.
Provide error(), warn(), and debug() methods.
The error() and warn() methods accept a message and metadata.
The debug() method accepts a message.
The package propagates errors from logger calls and event listeners. Add error control in your application when it needs a recovery step. Review the logger methods and the process object listeners for the first error.
Check the removed property after removeHandlers() returns.
The property is true only after cleanup succeeds.
If removeHandlers() throws, call it again to retry failed removals.
The package does not remove other listeners from the process object.
Each process object can have one active registration.
The package returns the active registration when you call it again with the same object.
Call removeHandlers() before you register that object with new options.
Pass a valid AbortSignal in the signal option.
Call abort() on its AbortController to remove the handlers.
Check removed after the abort call.
The package logs the exception. It does not stop or restart the application. Your application must control shutdown or recovery. An uncaught exception can leave the process in an unsafe state.
Use these commands from the repository root:
npm ci
npm testnpm test runs the repository validation suite. It does not diagnose errors in your application.