Hello, my dears,
I installed FreePBX 16 with Asterisk 16 on Debian 11. I can successfully access my FreePBX Admin Dashboard.
However, I get a critical error. This reads as follows in the dashboard: “UCP Node is not running”. In the “ucp_error.log” I see the following error messages:
UCP’s node service has older dependencies so you will have to downgrade node if you want to use it. FreePBX distro has node v8.16.0. Alternatively, you can use UCP without the node service.
Hello, I downgraded to nodejs version 8.16.0 with the command “n 8.16.0”. Unfortunately the error still exists. In the logging I see a different message now:
2023-05-19 08:35 +02:00: SyntaxError: Unexpected token import
2023-05-19 08:35 +02:00: at createScript (vm.js:80:10)
2023-05-19 08:35 +02:00: at Object.runInThisContext (vm.js:139:10)
2023-05-19 08:35 +02:00: at Module._compile (module.js:617:28)
2023-05-19 08:35 +02:00: at Object.Module._extensions..js (module.js:664:10)
2023-05-19 08:35 +02:00: at Module.load (module.js:566:32)
2023-05-19 08:35 +02:00: at tryModuleLoad (module.js:506:12)
2023-05-19 08:35 +02:00: at Function.Module._load (module.js:498:3)
2023-05-19 08:35 +02:00: at Function.Module.runMain (module.js:694:10)
2023-05-19 08:35 +02:00: at startup (bootstrap_node.js:204:16)
2023-05-19 08:35 +02:00: at bootstrap_node.js:625:3
2023-05-19 08:35 +02:00: /var/www/html/admin/modules/pm2/node/node_modules/pm2/lib/ProcessContainerFork.js:30
2023-05-19 08:35 +02:00: import(url.pathToFileURL(process.env.pm_exec_path));
2023-05-19 08:35 +02:00: ^^^^^^
Version 8 didn’t work for me as well, as I mentioned, 10.24.1 worked for me, but it could be different scenario for you. have you done fwconsole ma downloadinstall ucp to force reinstall the module?
Congrats! For my case, RL9 came with version 18 of NodeJS, I needed to downgrade for ucp to work, but if you can stick to the host server’s package manager, that’s the best!