fs.createReadStream(...)[Symbol.asyncIterator]() is not async iterable #23041
Labels
confirmed-bug
Issues with confirmed bugs.
experimental
Issues and PRs related to experimental features.
stream
Issues and PRs related to the stream subsystem.
I get the error:
This isn't exactly a bug, but I think the iterator returned by
fs.createReadStream(__filename)[Symbol.asyncIterator]()
doesn't implement the iterable protocol which is why this is happening.This might be useful if you wanted to consume the first X chunks of a stream using
await iterator.next()
and then conditionally consume the rest withfor await of
.The text was updated successfully, but these errors were encountered: