N4V FOR WEBI services fail to start due to Node.js version incompatibility with Mongoose

Anonymised summary of support ticket #992598 (2025-03-06)

Symptom

After a fresh installation, N4V FOR WEBI services (e.g., n4v_bars, n4v_gantt, n4v_rdf, n4v_circular) fail to start properly. The PM2 logs show a SyntaxError: Unexpected token '?' error related to the nullish coalescing operator (??), indicating a Node.js version incompatibility with the installed Mongoose module. Additionally, the MongoDB service is not running, and port 8201 (default for N4V services) is not listening.

Environment

N4V FOR WEBI extensions for SAP BusinessObjects Web Intelligence, Node.js v12.8.1, Mongoose v8.11.0, MongoDB v4.4.29, PM2 process manager, Red Hat Enterprise Linux 9.4.

Resolution

  1. Verify that MongoDB is running (default port 27017) using 'systemctl status mongod' or 'netstat -tlnp | grep mongo'. Start MongoDB if necessary.
  2. Stop all N4V services using 'pm2 stop all'.
  3. Check Node.js and Mongoose versions. Ensure Node.js version is compatible with the installed Mongoose module (Mongoose v8.x requires Node.js v14+).
  4. Upgrade Node.js to a compatible version (e.g., v14 or higher) if necessary.
  5. Clear N4V logs to avoid residual errors.
  6. Restart all N4V services using 'pm2 start all' and verify that port 8201 is listening.
  7. Check PM2 logs for any remaining errors and address them accordingly.