axiomhq / axiom-js

Official language bindings and library extensions for Axiom
https://axiom.co
MIT License
89 stars 14 forks source link

Named export 'Axiom' not found. The requested module '@axiomhq/js' is a CommonJS module #72

Closed yaronlevi closed 11 months ago

yaronlevi commented 1 year ago

Following the official docs and getting this error:

CleanShot 2023-09-10 at 18 18 51@2x

Any idea what might cause this?

yaronlevi commented 1 year ago

Also, if I try this import (without brackets) I get this error:

CleanShot 2023-09-10 at 18 26 32@2x

tmak commented 11 months ago

Currently, @axiomhq/js is unusable via ESM.

The following changes in packages/js/package.json would fix this:

That's how package.json for the pino and winston packages are configured. Is there any reason not to do the same for the js package?

SollyzDev commented 11 months ago

Hi we have a released a new version that fixes this build issue. It's still rc but maybe you could give it a try.

SollyzDev commented 11 months ago

should be fixed, feel free to open again if you are still facing the same issue.