The Module Named "pm2" is required

i am trying to upgrade our pbx (FreePBX 13.0.190.19) using the module admin. a number of the modules upgraded successfully but a handful gives the error The Module Named “pm2” is required.
any idea how to get around this?

Try installing pm2 from the shell:
fwconsole ma downloadinstall pm2

2 Likes

Hi!

Install “Process Management” in Module Admin…

For some weird reason the very short “internal name” of that module (pm2) is used when dependencies are shown instead of its description (“Process Management”).

I never noticed and it most likely always does that but this time the module name does not help much figure out what to install…

Good luck and have a nice day!

Nick

4 Likes

Great…worked for me…thanks adventurer

2 Likes

This didn’t work for me:

# fwconsole ma downloadinstall pm2
No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting pm2 download..
Processing pm2
Verifying local module download...Verified
Extracting...Done
Module pm2 successfully downloaded
sh: 1: node: not found
Node is not installed
Unable to install module pm2:
 - Failed to run installation scripts
Updating Hooks...Done

Any ideas?

The answer is right there. You need to install nodejs

1 Like

Nope.

# fwconsole ma downloadinstall nodejs
No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting nodejs download..
The following error(s) occured:
 - Retrieved Module XML Was Empty
yum install nodejs
2 Likes

Just figured out that it is an OS level package. In my case:

apt-get install nodejs
apt-get install node

But alas still no go on pm2:

# fwconsole ma downloadinstall pm2
No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting pm2 download..
Processing pm2
Verifying local module download...Verified
Extracting...Done
Module pm2 successfully downloaded
sh: 1: node: not found
Node is not installed
Unable to install module pm2:
 - Failed to run installation scripts
Updating Hooks...Done

Found a hint that the correct package for Raspian is nodejs-legacy. After removing the first two and installing that I get:

# fwconsole ma downloadinstall pm2
No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting pm2 download..
Processing pm2
Verifying local module download...Verified
Extracting...Done
Module pm2 successfully downloaded
Node version is: 0.10.29 requirement is 0.12.18. Run 'yum upgrade nodejs' from the CLI as root
Unable to install module pm2:
 - Failed to run installation scripts
Updating Hooks...Done

Sorry but you need to install nodejs 0.12.18 or higher. This is most easily accomplished by using the FreePBX Distro. Since you are on a Raspian there’s not much we can do other than tell you that you need 0.12.18 or higher.

Node JS is not a module in FreePBX. It is a requirement outside of that. When you use systems that are not the FreePBX Distro you will most likely have to build things manually or find them somewhere else.

The command that is run to check node and npm is:

node --version
npm --version
2 Likes

Figured it out. I installed nodejs following the instructions here:

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Then the pm2 install worked:

# fwconsole ma downloadinstall pm2   
...
 Finished updating libraries!
    Generating CSS...Done
    Module pm2 successfully installed
Updating Hooks...Done

# node -v
v6.10.2

Thank you for the help.

3 Likes

Having some similar trouble installing the proper version of nodejs to be able to install pm2.

Using CentOS 6.9 and FreePBX 13

I used these instructions to install nodejs

But when I try and run:

#fwconsole ma downloadinstall pm2
No repos specified, using: [standard,extended,unsupported,commercial] from last GUI settings

Starting pm2 download..
Processing pm2
Verifying local module download...Verified
Extracting...Done
Module pm2 successfully downloaded
Node version is: 0.10.48 requirement is 0.12.18. Run 'yum upgrade nodejs' from the CLI as root
Unable to install module pm2:
 - Failed to run installation scripts
Updating Hooks...Done

#yum upgrade nodejs
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
 * epel: fedora-epel.mirror.lstn.net
No Packages marked for Update

I can see that I don’t have the right version of nodjs but can’t figure out how to upgrade. This is more of OS issue than a freepbx issue but perhaps someone could nudge me in the right direction?

Since you aren’t using the distro (and if you are DO NOT DO THIS)

curl -sL https://rpm.nodesource.com/setup_0.12 | bash -
yum install -y nodejs

I had the same issue for a new distro install. I downloaded the distro USB image yesterday.

If you are running the free pbx distro the yum install nodejs will work for you it is a recent dependency for some recently upgraded modules

If you are running the distro, and keeping current with distro updates, then you would already have nodejs installed:
https://wiki.freepbx.org/display/PPS/Updating+FreePBX+Official+Distro

Process Management is found in Module Admin under Extended modules not Standard.

I am getting the same error. FreePBX Distro 13.0.192.9 with all current updates. Run “yum install nodejs” and get

Package nodejs-0.12.18-1nodesource.el6.x86_64 already installed and latest version. Nothing to do

Run “fwconsole ma downloadinstall pm2” and get the following two errors:

[npm-cache] [INFO] [composer] Dependency config file /var/www/html/admin/modules/pm2/node/composer.json does not exist. Skipping install

[npm-cache] [INFO] [bower] Dependency config file /var/www/html/admin/modules/pm2/node/bower.json does not exist. Skipping install

Any ideas how to fix this? In Module Admin, PM2 is “Disabled: Pending upgrade to 13.0.3.15” The current version shows as 13.0.3.13

Those aren’t errors. Can you provide the full output.