Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!