Closed BradNut closed 1 year ago
created a PR to switch to named exports, waiting for the ci workflow to confirm that its working, if so, will create a new release.
a new version is out with the fix from the PR above, can give it a try, hopefully it will work out ✌️
I think the issue i'm facing is related, also had axiom node and switch to the latest patched verion 0.1.3 of winston but get this error
lient:build:
client:build: ./worker/lib/logger.ts:2:0
client:build: Module not found: Default condition should be last one
client:build: 1 | import winston from 'winston'
client:build: > 2 | import { WinstonTransport as AxiomTransport } from '@axiomhq/winston'
client:build: 3 | import env from '../../lib/env'
client:build: 4 | const { combine, errors, json } = winston.format
downgrading to 0.1.2 (before you patched for this issue, fixed it)
I think the issue i'm facing is related, also had axiom node and switch to the latest patched verion 0.1.3 of winston but get this error
lient:build: client:build: ./worker/lib/logger.ts:2:0 client:build: Module not found: Default condition should be last one client:build: 1 | import winston from 'winston' client:build: > 2 | import { WinstonTransport as AxiomTransport } from '@axiomhq/winston' client:build: 3 | import env from '../../lib/env' client:build: 4 | const { combine, errors, json } = winston.format
downgrading to 0.1.2 (before you patched for this issue, fixed it)
that makes it more complex, I will have to look for a different way to compile to ESM And CJS.
I just looked through the codebase looks like you're using tsc directly, I've had the same headache just the other month when i got into writing an itnernal lib.
What i've found works best is rollup. Seems the most reliable for creating types and esm/umd and commonjs packages all in 1.
It seems to be the standard across allot of libs. I've exprimented and now use esbuild for our internal things, but esbuild doesnt produce types so i still have to run tsc afterwards. So i'd recommend rollup for your use case to get the lib compatible with all 3 crazy javascript ecosystem types :P
I'd be happy to contribute a PR :) Just busy at the moment, but i'll try perhaps to maybe submit something next week.
Many thanks :)
hi @PandelisZ , any progress on that with rollup? I played a bit with converting the package to a module but had similar problems. If you have started something with rollup I can take a look and help pushing it to finish line.
I have something in progress here feel free to review and drop comments.
should be fixed, feel free to open again if you are still facing the same issue.
In SvelteKit Vite I previously had
@axiomhq/axiom-node
set up and working.Now after upgrading to use
@axiomhq/js
I get the following error:Code for setup in Vite was the same as this open source project's file: https://github.com/delay/sveltekit-auth-starter/blob/main/src/lib/server/log.ts
The only changes were the import from
import { Client } from '@axiomhq/axiom-node';
toimport { Axiom } from '@axiomhq/js';
And from:
To: