Version
19.3
Platform
darwin
Subsystem
No response
What steps will reproduce the bug?
The code below works on v18.13.0 but crashes on v19.3.0
import{pipeline}from'node:stream/promises'asyncfunction*myCustomReadable(){yieldBuffer.from(`tick: ${newDate().toISOString()}`)}asyncfunction*myCustomWritable(stream){forawait(constchunkofstream){console.log(chunk.toString())}}awaitpipeline(myCustomReadable,myCustomWritable,)node:internal/streams/readable:192
const isDuplex = this instanceof Stream.Duplex;
^
TypeError: Right-hand side of 'instanceof' is not an object
at PassThrough.Readable (node:internal/streams/readable:192:25)
at PassThrough.Duplex (node:internal/streams/duplex:58:12)
at PassThrough.Transform (node:internal/streams/transform:106:10)
at new PassThrough (node:internal/streams/passthrough:42:13)
at pipelineImpl (node:internal/streams/pipeline:280:20)
at node:stream/promises:28:5
at new Promise (<anonymous>)
at pipeline (node:stream/promises:17:10)
at file:///Users/erickwendel/Downloads/projetos/cursos/mastering-streams/mastering-streams-code/example.mjs:12:7
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v19.3.0
but it works if explicitly convert it to a Readable
awaitpipeline(Readable.from(myCustomReadable()),myCustomWritable,)
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
TypeError: Right-hand side of 'instanceof' is not an object
Additional information
@nodejs/streams @nodejs/tooling
Version
19.3
Platform
darwin
Subsystem
No response
What steps will reproduce the bug?
The code below works on
v18.13.0but crashes onv19.3.0but it works if explicitly convert it to a Readable
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
TypeError: Right-hand side of 'instanceof' is not an objectAdditional information
@nodejs/streams @nodejs/tooling