-
Notifications
You must be signed in to change notification settings - Fork 404
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
Pino does not work with ESM loader in v11 #1802
Comments
Hi @y-a-v-a sorry for your troubles. Can you provide a more concrete reproduction case? |
Example repo here: Cheers, |
Hi @y-a-v-a this is a duplicate of #1777. It's a bug in a 3rd party package we use to instrument ESM( I also noticed you're using the ESM loader and a standalone server. If you rely on next CLI you could get rid of loader by doing |
Hi @bizob2828, thanks for the feedback. Let's await the fix in the 3rd party package then. #1777 is almost worth a mention in the README, or at least in the release notes, imho. We'll keep an eye on this repo! |
Description
In a NextJS 12.3.4 application we have a custom server along with Pino and NewRelic.
When I start up Next with the following command, the application starts throwing errors immediately, but nothing to
stdout
orstderr
.From the inspector panel I do see the following:
From one.newrelic.com we see continuous errors reported
Expected Behavior
No errors are reported, output is sent to stdout.
Troubleshooting or NR Diag results
Steps to Reproduce
Your Environment
NextJS v12.3.4 runs in a Docker container, versions of deps as mentioned above.
Also reproducible on Mac OS 13.5.2
NodeJS 18.17.1
All works as expected when using NewRelic v10.x.x (up until its latest version).
Additional context
Similar report found here: https://forum.newrelic.com/s/hubtopic/aAX8W000000PHYsWAO/newrelic-does-not-show-logs-for-nextjs-app?t=1696848988884
Upgrading
@newrelic/next
doesn't make a difference. Droppingpino-pretty
in favor of usingpino/file
doesn't make a difference either.The text was updated successfully, but these errors were encountered: