Closed hornta closed 1 year ago
Closing. I tested version 18 of node and it works so I guess the MDN documentation was lying to me:
Actually, the implementation exists in Node.js 16.18.0 but it is not exposed via the globalThis
object. See https://nodejs.org/docs/latest-v16.x/api/webstreams.html#class-transformstream. So you would need to add the code below in your project to make it run in Node.js 16. The same probably applies for ReadableStream
and WritableStream
classes (and maybe Blob
).
import { TransformStream } from "node:stream/web";
globalThis.TransformStream = TransformStream
I'm getting this error when running this package in Node.js 16.13.2
Version: 2.6.50
It looks like TransformStream was introduced in version 16.5.0 so I expect it should work. This is my code: