-
Notifications
You must be signed in to change notification settings - Fork 878
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
After building 'unable to determine transport target for "@axiomhq/pino"' due to "cjs" folder being deleted after build #1964
Comments
Thanks for reporting! Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. These bundling issues are quite tricky, so if you would like to also send a PR... that would be amazing. |
I have the exact same problem. I'm not able to give you a reproducible example at the moment. But it's fairly simple, just make a transport object for axiom and try deploy it on netlify or vercel and. you'll see the error yourself. I jumped from Winston to Pino because of its asynchronous logging. But it doesn't work in production, sadly enough. |
I setup the following project to reproduce the problem: I hope you have the time to look at it 👀 |
Anyone figure out a workaround? When using |
Hi there, I ended up using Axiom without Pino. I don't want to depend on too many packages. The advantage of Pino is you can easily change transport to send your logging to another service. |
Also seeing this issue in Vercel, using @axiomhq/pino transport. Any updates? |
Also seeing a possible? similar issue when using
|
Also seeing this in Vercel with NextJS. The reproducible example from 2 weeks ago in #1964 (comment) matches how I am trying to use pino with a transport target EDIT: I've added a simple module.exports = {
experimental: {
serverComponentsExternalPackages: [
'thread-stream',
'pino',
'pino-worker',
'pino-file',
'pino-pretty',
'@axiomhq/pino',
],
},
} |
@carsonb I ended up getting an issue runtime, when When we |
The |
Hello !
thanks for the great package!
I have been trying to connect to axiom and send logs. while in development everything works fine.
but in deployment I keep receiving the follwoing error
am using Nuxt3 with vite.
I did try to turn off treeshaking in
nuxt.config.ts
but still the same issue.
Here is my logger code:
Note: it works just fine with pino-pretty. but am not sure what is happening in the building step.
i spent my whole day playing around .. and I have no clue... what is happening on the build step
Debugging the production version using this modification :
shows that the
@axiomhq\pino\dist\cjs\index.cjs
is what it tries to use.though in vite
.cjs
is depreciated and it should use.mjs
also in the build output the
cjs
folder is deleted and doesn't exists, which causes this error.The text was updated successfully, but these errors were encountered: