-
-
Notifications
You must be signed in to change notification settings - Fork 235
Closed
Description
@mcollina We're running into the same issue as fastify/fastify#1413 after updating to fastify rc.6. Looking closer, it seems the main readable-stream ^3.x export is missing the new finished and pipeline methods when running with READABLE_STREAM=disable:
Lines 2 to 11 in 1df8b0c
| if (process.env.READABLE_STREAM === 'disable' && Stream) { | |
| module.exports = Stream; | |
| exports = module.exports = Stream.Readable; | |
| exports.Readable = Stream.Readable; | |
| exports.Writable = Stream.Writable; | |
| exports.Duplex = Stream.Duplex; | |
| exports.Transform = Stream.Transform; | |
| exports.PassThrough = Stream.PassThrough; | |
| exports.Stream = Stream; | |
| } else { |
Unsetting READABLE_STREAM isn't an option since many dependencies are stuck on readable-stream <= 3.x, and we need the consistency of using node-core streams across the board. I'm able to fix this (for now) by doing an Object.assign(require('readable-stream'), require('stream')) before requiring fastify, but this may not be a stable solution as more libraries update to readable-stream 3.x.
Metadata
Metadata
Assignees
Labels
No labels