Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
10 replies
Néstor

How to process.exit(1) from NextJS app

Currently I´m trying to `process.exit(1) from inside a nextjs app runnig in standalone mode inside a container.

But I cannot get the process (and container) to be terminated. Instead I get a
Error: socket hang up
    at connResetException (node:internal/errors:705:14)
    at Socket.socketOnEnd (node:_http_client:518:23)
    at Socket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNRESET'
}
Was this page helpful?