Closed kevin-ye225 closed 2 months ago
Please provide a sample of code so that any of us can experiment and attempt to reproduce your concerns.
You did provide a sample. Sorry, I missed it (my fault). Next time though try wrapping the code sample in back ticks so that the markdown formats it as code explicitly, for example
```
some code
```
Is pipeline sourced from the stream library as in : import {pipeline} from "node:stream"
? Also I do not see a src
object in the code sample, so where does that come into play. The once
method is available upon events and event emitters, so you should expect src.once to be undefined if src is not an event or event emitter:
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
Hi, I am currently doing pipeline(res.body, dest, err => err handling) after getting the response from node-fetch, after upgrading to node 18, it is throwing an error saying that src.once is not a function, I look at the response type from node-fetch, while the body is indeed a ReadableStream that implements EventEmitter, which has a once function, when I log it, it says undefined, which is why it is causing this to fail i think.
I tried switching to the global fetch provided in node 18 with no luck. How should I address this? polyfill the once function somehow?
Node.js version
18.17.0
Example code
pipeline(res.body, dest, (err) => { if (err) { return rej(err); } return res(); });
Operating system
macOS
Scope
runtime
Module and version
Not applicable.