Open Fi1osof opened 4 years ago
I'm having the sabe problem. DId you find any solution?
@carlossuds, sorry, no. I do not use this any more.
Still a thing unfortunately, not well-versed enough in JS yet, but if I find something I'll make a PR. In the meantime, express-prometheus-middleware works for me, so you can use that on instead.
Edit: You can use this trick https://dev.to/jimthedev/typeerror-cannot-read-property-filename-of-undefined-in-es-modules-in-node-14-and-greater-6ia
prometheus-api-metrics/src/index.js:5:73
node started with --experimental-modules, there no module object. Path.dirname(module.parent.filename)
Maybe use dir: process.cwd() instead?