Closed
Description
Version
16.10.0
Platform
docker node:16:10.0
Subsystem
No response
What steps will reproduce the bug?
The following code
const { pipeline } = require('stream/promises');
const fs = require('fs');
async function main() {
const streams = [fs.createReadStream(__filename),os = fs.createWriteStream(__filename + ".copy")]
await pipeline(streams)
}
main().then(() => {console.log('Success')}).catch((e) => {console.log(e)})
Works in 16.9.0.
In 16.10.0 it fails with
root@6d10d954f21e:/# node test.js
TypeError [ERR_MISSING_ARGS]: The "streams" argument must be specified
at new NodeError (node:internal/errors:371:5)
at pipelineImpl (node:internal/streams/pipeline:181:11)
at node:stream/promises:26:5
at new Promise (<anonymous>)
at pipeline (node:stream/promises:17:10)
at main (/test.js:8:10)
at Object.<anonymous> (/test.js:12:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
code: 'ERR_MISSING_ARGS'
}
root@6d10d954f21e:/#
In 17.0.1 it works again.
How often does it reproduce? Is there a required condition?
100% in 16.10..
What is the expected behavior?
The code should work.
What do you see instead?
No response
Additional information
I did not see an existing issue for this...