-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails silently on node 16 #103
Comments
This is due ab6d344 - they removed "cross-fetch" and do not have any polyfills - so if you try using axiom in node it will fail... @axiom-js Please add ANY fetch polyfill to the package. |
Any chance we get fetch working again? Is this still the libary to use for nodejs? |
can you import the polyfill package right before axiom-js? I believe node 16 is deprecated. |
The problem isn't the lack of support for fetch. It's the fact that it's failing without any indication as to why, making it extremely difficult to diagnose the issue. There should be a warning or indication when logs are not being sent to axiom |
Hello???? Trying to use rhe package ans no logs are sent |
Don't forget to expose |
Description
I was trying out the @axiomhq/js and the @axiomhq/winston packages and both seem to fail on node 16 but give out little to no information/errors.
The documented axiom-winston (https://github.com/axiomhq/axiom-js/tree/main/packages/winston) method were logging the winston logs locally, but not sending it to axiom. There were no errors/messages/indication of why it was failing.
Then I tried the
js
method (https://github.com/axiomhq/axiom-js/tree/main/packages/js) which failed withReferenceError: fetch is not defined
.After upgrading to node 20, which does have built-in fetch support, It seemed to work well.
I also did get a
Error: Not found
that's pretty unhelpful.Expected
Error: Not found
error to give more information.Info
Failing on node version: v16.20.0
Works fine on node version: v20.9.0
The text was updated successfully, but these errors were encountered: