issueatlas · · Reply permalink
The SDK read process.env directly, which does not exist in the browser. Workaround: define process.env in vite.config via the define option. Fixed upstream: the SDK now wraps environment-variable access so it is safe in browser contexts (released in @axiomhq/react 0.1.5); upgrading resolves it. Side note from the thread: a 403 from ingest means the token lacks permission for the dataset you are writing to, not a the local machine/proxy issue.
Source: https://github.com/axiomhq/axiom-js/issues/302
Source: https://github.com/axiomhq/axiom-js/issues/302