You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Method bytesRead called on incompatible receiver #<Pipe>
at Socket.bytesRead (net.js:659:38)
at _clone (node_modules/config/lib/config.js:1210:33)
at _clone (node_modules/config/lib/config.js:1210:20)
at _clone (node_modules/config/lib/config.js:1210:20)
at Config.cloneDeep (node_modules/config/lib/config.js:1217:10)
at node_modules/config/lib/config.js:1477:32
at Array.forEach (<anonymous>)
at Config.Object.<anonymous>.util.extendDeep (node_modules/config/lib/config.js:1454:9)
at Config.Object.<anonymous>.util.setModuleDefaults (node_modules/config/lib/config.js:414:8)
at Object.<anonymous> (src/index.js:9:13)
After much discussion, it seems that this way (throwing) will remain for the foreseeable future (nodejs/node#17636 and friends linked in there) in these situations.
Now the reason I'm opening this issue on bunyan, and not node_config or Node.js, is that the above configuration works OK with winston.
This is an example of it happening manually (node-config accesses this property automatically):
> const b = require('bunyan').createLogger({name: 'test'})
> b.streams[0].stream._handle.__proto__.bytesRead
TypeError: Method bytesRead called on incompatible receiver #<TTY>
It seems to me that Winston doesn't expose this stream and its _handle in the same way or at all. I'm happy to figure out how to fix this in bunyan, if you think it's an issue/worth fixing. On our end, we've unfortunately had to temporarily remove support for 'bunyan' in our logger config.
The text was updated successfully, but these errors were encountered:
So this is a bit of a combo issue, so I wasn't quite sure where to open it, but I think this might be the right place and I'll explain why.
So we're using node-config to configure our bunyan logger like so:
In node versions below 8.8.1 this works fine. Starting in node version 8.9.0, it fails, in different ways:
._handle
through --inspect with chrome developer tools crashes Node.js nodejs/node#16949 (comment), i.e. it loops through the properties and tries to read them and compare them (to figure out if there is a circular structure (https://github.com/lorenwest/node-config/blob/master/lib/config.js#L1216).After much discussion, it seems that this way (throwing) will remain for the foreseeable future (nodejs/node#17636 and friends linked in there) in these situations.
Now the reason I'm opening this issue on bunyan, and not node_config or Node.js, is that the above configuration works OK with
winston
.This is an example of it happening manually (node-config accesses this property automatically):
It seems to me that Winston doesn't expose this stream and its
_handle
in the same way or at all. I'm happy to figure out how to fix this inbunyan
, if you think it's an issue/worth fixing. On our end, we've unfortunately had to temporarily remove support for 'bunyan' in our logger config.The text was updated successfully, but these errors were encountered: