signalfx/signalfx-nodejs

Winston version 1.0.1 uses an outdated dependency pkginfo that appears to be incompatible with Webpack

Closed this issue · 1 comments

The Node.js client library for SignalFx uses version 1.0.1 of Winston. Version 2.3.0 of the Winston library includes a fix for an issue related to an outdated pkginfo dependency (the pull request for Winston that resolved this issue is here: winstonjs/winston#931). Versions of Winston prior to 2.3.0 are incompatible with any Node application bundled via Webpack, since pkginfo cannot find package.json from the bundled output.

Currently, using the Node.js client library for SignalFx in a Node application bundled via Webpack causes failure at the start script, node dist/index:

Could not find package.json up from: /
at Function../node_modules/pkginfo/lib/pkginfo.js.pkginfo.find
at Function../node_modules/pkginfo/lib/pkginfo.js.pkginfo.read
at ./node_modules/pkginfo/lib/pkginfo.js.module.exports
at Object.
at Object../node_modules/pkginfo/lib/pkginfo.js
at webpack_require
at fn
at Object.
at Object../node_modules/winston/lib/winston.js
at webpack_require

Also having this issue, would be great to have it fixed.
I'll see if I can open a PR to bump the version (if there's no breaking changes).