I’m trying to run Nextjs app using output:'standalone'
mode but getting:
Error: unable to determine transport target for "pino-datadog-transport"
at fixTarget (/app/node_modules/pino/lib/transport.js:144:13)
at Function.transport (/app/node_modules/pino/lib/transport.js:114:22)
at h.init (/app/.next/server/chunks/4010.js:1:180966)
at new h (/app/.next/server/chunks/4010.js:1:180803)
at h.getInstance (/app/.next/server/chunks/4010.js:1:180915)
at f.updateSessionConfig (/app/.next/server/chunks/4010.js:1:183627)
at new f (/app/.next/server/chunks/4010.js:1:183836)
at f.getInstance (/app/.next/server/chunks/4010.js:1:183964)
at /app/.next/server/chunks/4010.js:1:66204
However, this works fine in default mode.
It works if I import the entire package like import 'pino-datadog-transport'
but first js build size becomes very heavy, slowing down the app overall.
Note: The app is deployed in the dockerized container.