nodejs / readable-stream

Node-core streams for userland
https://nodejs.org/api/stream.html
Other
1.03k stars 227 forks source link

Can't use async generators and functions in pipeline #436

Closed Sceat closed 2 years ago

Sceat commented 4 years ago
pipeline(
  async function*() { yield 0 },
  async source => {},
  error => { console.log(error) }
)

The above is failing with a

TypeError: stream.on is not a function
ronag commented 4 years ago

This is not supported in readable-stream yet. Please use node v14 and core streams (i.e. require('stream')).

Sceat commented 4 years ago

Well i'd like to adapt a lib for browser usage so i can't, I'll try to PR this

mcollina commented 4 years ago

We'll start working on a v14-based version soon.