stream.on is not a function
See original GitHub issueHi, in fastify-cli we have a report of this error with the v1.6.0 release:
To reproduce:
npx fastify-cli generate pretty
cd pretty/
npm i
// edit the package.json adding "-P" flag in the start script
npm start
// now we have the error
// to solve:
npm ls pino-colada
// you should see 1.6.0
// installing previous version works:
npm i pino-colada@1.5.1
npm start
// all works fine
There are some fixes we should apply to our code base? We use pino-colada here: https://github.com/fastify/fastify-cli/blob/b6e7caba7e8f2644f5243f9d94902faacfbda886/start.js#L98-L102
Thanks
The stack trace:
stream.on('close', function () {
^
TypeError: stream.on is not a function
at destroyer (C:\Users\behem\workspaceFastify\asd\boooom\node_modules\pump\index.js:26:10)
at C:\Users\behem\workspaceFastify\asd\boooom\node_modules\pump\index.js:70:12
at Array.map (<anonymous>)
at pump (C:\Users\behem\workspaceFastify\asd\boooom\node_modules\pump\index.js:67:26)
at runFastify (C:\Users\behem\workspaceFastify\asd\boooom\node_modules\fastify-cli\start.js:101:5)
at start (C:\Users\behem\workspaceFastify\asd\boooom\node_modules\fastify-cli\start.js:50:10)
Original issue ref: https://github.com/fastify/fastify-cli/issues/235
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why TypeError: stream.on is not a function - Stack Overflow
I have written a set of gulp commands to uglify/remove comments from JS code. Since I wanted to trace the exceptions properly, I...
Read more >TypeError: stream.on is not a function · Issue #167 - GitHub
This is most likely due to you using the wrong version of a custom plugin. We migrated away from streams to promises last...
Read more >How to solve the "is not a function" error in JavaScript
js we use require() to load external modules and files. This can cause, in some cases, an error like this: TypeError: require(...) is...
Read more >Using readable streams - Web APIs | MDN
You write a function that starts off by reading the stream. If there is no more stream to read, you return out of...
Read more >Node.js Stream.pipeline() Method - GeeksforGeeks
... not accomplished. Return Value: It returns a cleanup function. Below examples illustrate the use of stream.pipeline() method in Node.js:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I confirm, it’s working fine, tried right now.
@mcollina npm didn’t let me unpublish, i did try on friday.
Therefore, I’ve published 1.5.1 as 1.6.1. Let me know if something is off. Hopefully that means you don’t have to lock it anymore!