pino logger bug when used webpack the worker has exited
Author: mai1x9Created Sep 22, 2024Updated Mar 23, 2026
message: 'uncaughtException: the worker has exited\n' +
'Error: the worker has exited\n' +
' at ThreadStream.write (/home/ubuntu/services/development/admin-server/dist/app.js:5059:19)\n' +
' at Pino.write (/home/ubuntu/services/development/admin-server/dist/app.js:2680:10)\n' +
' at Pino.LOG [as debug] (/home/ubuntu/services/development/admin-server/dist/app.js:3516:21)\n' +
' at Logger.debug (/home/ubuntu/services/development/admin-server/dist/app.js:545:21)\n' +
' at Object.PostgresMasterSlave.logging (/home/ubuntu/services/development/admin-server/dist/app.js:38055:59)\n' +
' at Sequelize.log (/home/ubuntu/services/development/admin-server/dist/app.js:39386:15)\n' +
' at /home/ubuntu/services/development/admin-server/dist/app.js:55734:24\n' +
' at Query.run (/home/ubuntu/services/development/admin-server/dist/app.js:63019:5)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
' at async /home/ubuntu/services/development/admin-server/dist/app.js:39149:16\n' +using webpack to build the project, I am using pino to log to error.log file, as well as pino pretty and aws cloudwatch as transports. 3 transports have been used.
When I build the project with webpack, i am getting error because of pino logger. Above is the error stack (it is from
dist/app.js), however on debugging i could see that error is atlogger.debugorlogger.infoby pino.I have checked: https://github.com/pinojs/pino/issues/1429 but no use.
Any Ideas how to fix it ??
Source: pinojs/pino