ecs-logging-nodejs icon indicating copy to clipboard operation
ecs-logging-nodejs copied to clipboard

Can't resolve 'elastic-apm-node'

Open aniketbiprojit opened this issue 7 months ago • 3 comments

⚠ ./node_modules/.pnpm/@[email protected]/node_modules/@elastic/ecs-winston-format/index.js Module not found: Can't resolve 'elastic-apm-node' in '.pnpm/@[email protected]/node_modules/@elastic/ecs-winston-format'

Should I need to install this? I am not using elastic-apm-node anywhere.

This happens when I trying to integrate with Nextjs. Runs fine otherwise.

export const logger = winston.createLogger({
  format: ecsFormat(),
  transports: [
    new winston.transports.Console(),
    new winston.transports.File({ filename: `${outLogPath}/out-json.log` }),
  ],
});

This seems to be silently ignored in js file but I still get this error logged in NextJS logs.

Any ideas on how to suppress this error?

image

aniketbiprojit avatar Jul 04 '24 12:07 aniketbiprojit