Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

134
Visualizações
PM2 problem with NodeJS processing spawn() child_process

I started using const { spawn } = require('child_process') in my nodejs app and PM2 started throwing the following errors:

    at Timeout._onTimeout (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/eventLoopMetrics.js:39:43)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
TypeError: process._getActiveRequests is not a function
    at Timeout._onTimeout (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/eventLoopMetrics.js:39:43)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/features/notify.js:122
        if (process.listeners('uncaughtException').length === 1) {
                    ^

TypeError: process.listeners is not a function
    at NotifyFeature.onUncaughtException (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/features/notify.js:122:21)
    at process.emit (node:events:390:28)
    at process._fatalException (node:internal/process/execution:170:25) 

The weird thing is that when I stop the process in PM2 and run it directly with node it works perfectly. But I can't find a way to fix it from PM2.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda