riemann-nodejs-client
riemann-nodejs-client copied to clipboard
Don't use `__dirname` when loading proto/proto.proto
https://github.com/riemann/riemann-nodejs-client/blob/master/riemann/serializer.js#L17
When bundling, this becomes the directory of the caller, leading to:
(node:17555) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/proto/proto.proto'
Good find, can you send a PR?
Sure thing
@perezd Is using the older .proto format required, or can it be migrated to use the JSON descriptors:
https://www.npmjs.com/package/protobufjs#using-json-descriptors
This would make bundling it easier since the proto.json file can be loaded along with the riemann client js.
it could support both, but I won't accept a PR that breaks existing usages. Adding support while maintaining the original API would be fine tho.