Error: unable to determine transport target for "pino-roll"
GasparAdragna opened this issue · 1 comments
GasparAdragna commented
Im trying to deploy my nextjs application but in my docker im getting this error when it launches:
Error: unable to determine transport target for "pino-roll"
Im able to run it no problem while im developing.
I found on stackoverflow that someone suggested adding the import at the top of the file, so i did that and now im getting:
The "superCtor.prototype" property must be of type object. Received undefined
I dont really understand why it works fine on development and when i run the production build locally but not when deployed.
Here is the file im using:
import pino from "pino";
import "pino-roll";
const logger = pino({
level: "debug",
timestamp() {
return `,"time":"${new Date().toLocaleString("es")}"`;
},
transport: {
targets: [
{
level: "debug",
options: {
file: process.env.LOGGING_FILE || "./logs/output.log",
frequency: "daily",
mkdir: true,
size: 10,
},
target: "pino-roll",
},
{
level: "info",
options: {
colorize: true,
destination: 1,
translateTime: "SYS:dd-mm-yyyy HH:mm:ss",
},
target: "pino-pretty",
},
],
},
});
export default logger;
Anyway, thanks!
mcollina commented
Thanks for reporting. I think you should report this to Vercel. I have no way to debug what they are doing on their end.