#66349·Node.js

stream: Duplex.from errors when async function body resolves without consuming its input

Author: kethinovCreated Sep 27, 2026Updated Sep 28, 2026
Labelsconfirmed-bugstreamregressionv26.x

Version

26.10.0

Platform

All

Subsystem

No response

What steps will reproduce the bug?

The bug, as of node 26.10.0:

node -v
v26.10.0
node -e "require('node:stream').Duplex.from(async () => {})"
node:events:505
    throw er; // Unhandled 'error' event
    ^

AbortError: The operation was aborted
    at destroyer (node:internal/streams/destroy:328:11)
    at node:internal/streams/duplexify:120:13
Emitted 'error' event on Duplexify instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  code: 'ABORT_ERR'
}

Node.js v26.10.0

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior? Why is that the expected behavior?

The original behavior, as of node 26.9.0:

node -v
v26.9.0
node -e "require('node:stream').Duplex.from(async () => {})"
// no output; this is expected

What do you see instead?

The above error.

Additional information

0bf9e9f833 (#65963) introduced a regression. It destroys the duplex when an async function body resolves without consuming its input, so that pipeline() propagates destruction upstream. It destroys it through destroyer(), which synthesizes an AbortError for any stream that is not yet finished.

This bug breaks anything that uses p-transform (yeoman-environment and mem-fs).

PR fix here: https://github.com/nodejs/node/pull/66243