Freepbx 15 Pm2 Issues - Cannot reinstall

Hello all,

I am in need of help with installing PM2. I run the Freepbx 15 Distro in a VMware Workstation on Windows 10 and everything has been working fine for over a year but recently there was some update and some issue where I read online that I should uninstall PM2 and reinstall it. I uninstalled it and now my System Admin module is broken and various other modules, the system still works luckily but I don’t have a good recent backup and made and I am in desperate need of fixing it. Can anyone assist please? I have tried upgrading the node version from 8.13.x to 11 and I have nvm installed but that has not helped.

What issue and where did you read that you should do this?

This was also probably a bad idea. How did you do this upgrade? FreePBX Distro has node.js in the OS repository.

After you get the version set back to what distro expects, fwconsole ma downloadinstall pm2 should reinstall the pm2 module.

It was the issue where the system had upgraded itself and some errors were popping up, I cannot remember exactly what.

That command does nothing, it gives the same errors, that pm2 cannot be located. It was the same before upgrading the node version and afterwards, no change.

After downgrading node and confirming that
fwconsole ma downloadinstall pm2
still fails, post the output of
fwconsole ma listonline

After you get this fixed, please see

Hi Stewart,

Thank you for the response. Even before, when it was on version 8.13, I had the exact same issue. What version would you like me to downgrade to?

Here is what I get now:

Screenshot 2023-06-03 224937

I just downgraded to where it was, 8.13 and I have the same result:

Screenshot 2023-06-03 225330

Any further advice?

The fact to downgrade nodeJS is enough usually.
try to restart Freepbx system after downgrading nodeJS with : fwconsole restart
next
fwconsole ma updateall
fwconsole r
fwconsole ma install pm2
if it doesn’t work, then try fwconsole ma install pm2 --force

Anyway, the fact to update NodeJS is a bad idea for any FreePBX systems.

Also, you can install a new FreePBX system with your current version and compare NodeJS settings, configs and version.

Just an idea like that.

Otherwise, there is some thread about NodeJS and this kind of issue on this forum.
Browse it then.

npm  install -g n
n install 8
hash -r 

WFM

Hi,

I wasn’t able to do the restart command because pm2 is missing so I did a hard reboot. Afterwards, the second command updateall also could not be done because it kept asking to specify a repo

Hi,

I did this successfully but what afterwards? Pm2 is still unable to be located when I try to install.

when you have node v8 as your default (node -v) , then pm2 should be downloadinstall’able. post a log

How do I get the log?

fwconsole ma downloadinstall pm2|pastebin


I just noticed node 11 is the active one.

Just set it top 8.17 and still the same thing.

fwconsole ma list|egrep “repo|pm2”

fwconsole ma listonline