diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index 76b2066e9b7fd0..3831518a665b52 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -212,7 +212,7 @@ function createWriteErrorHandler(instance, streamSymbol) { // removed after the event, non-console.* writes won't be affected. // we are only adding noop if there is no one else listening for 'error' if (stream.listenerCount('error') === 0) { - stream.on('error', noop); + stream.once('error', noop); } } };