Error after update: Unable to locate the FreePBX BMO Class 'Pm2'

FreePBX 13.0.195.19
Current Asterisk Version: 13.23.1

Error:
Exception (404)
HELP
Unable to locate the FreePBX BMO Class 'Pm2’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install pm2 2) fwconsole ma enable pm2

Have attempted to install fwconsole & pm2, but no such luck.

Constantly have “Apply Config” button, but when clicked, gives this error:
Reload failed because retrieve_conf encountered an error: 1
exit: 1
Exception: Unable to locate the FreePBX BMO Class 'Pm2’A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install pm2 2) fwconsole ma enable pm2 in file /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 216
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:216
  2. FreePBX\Self_Helper->loadObject() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:104
  3. FreePBX\Self_Helper->autoLoad() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
  4. FreePBX\Self_Helper->__get() /var/www/html/admin/modules/zulu/Zulu.class.php:39
  5. FreePBX\modules\Zulu->__construct() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:125
  6. FreePBX\Self_Helper->autoLoad() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
  7. FreePBX\Self_Helper->__get() /var/www/html/admin/libraries/BMO/Hooks.class.php:298
  8. FreePBX\Hooks->preloadBMOModules() /var/www/html/admin/libraries/BMO/Hooks.class.php:39
  9. FreePBX\Hooks->updateBMOHooks() /var/lib/asterisk/bin/retrieve_conf:61
    1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

Any tips on resolving? I have spent hours searching and trying various solutions, but none have worked thus far.

Thanks for any help or suggestions!

Show us what happens when you run those commands.

Asterisk CLI
CLI Command

fwconsole ma install pm2
No such command ‘fwconsole ma install pm2’ (type ‘core show help fwconsole ma’ for other possible commands)

Asterisk CLI
CLI Command

fwconsole ma enable pm2
No such command ‘fwconsole ma enable pm2’ (type ‘core show help fwconsole ma’ for other possible commands)

From SSH Session:

[[email protected] ~]# fwconsole ma install pm2
Installing/Updating Required Libraries. This may take a while…The following messages are ONLY FOR DEBUGGING. Ignore anything that says ‘WARN’ or is just a warning
Found npm-cache v0.7.0
Running installation…
[npm-cache] [INFO] using /home/asterisk/.package_cache as cache directory
[npm-cache] [INFO] [composer] Dependency config file /var/www/html/admin/modules/pm2/node/composer.json does not exist. Skipping install
[npm-cache] [INFO] [npm] config file exists
[npm-cache] [INFO] [npm] cli exists
[npm-cache] [INFO] [npm] hash of /var/www/html/admin/modules/pm2/node/package.json: 72e37e0910b4ea542a3fc885a90f5372
[npm-cache] [INFO] [npm] cache exists
[npm-cache] [INFO] [npm] clearing installed dependencies at /var/www/html/admin/modules/pm2/node/node_modules
[npm-cache] [INFO] [npm] …cleared
[npm-cache] [INFO] [npm] retrieving dependencies from /home/asterisk/.package_cache/npm/2.15.11/72e37e0910b4ea542a3fc885a90f5372.tar.gz
[npm-cache] [INFO] [bower] Dependency config file /var/www/html/admin/modules/pm2/node/bower.json does not exist. Skipping install
[npm-cache] [INFO] [npm] done extracting
[npm-cache] [INFO] successfully installed all dependencies

Finished updating libraries!

[Symfony\Component\Process\Exception\ProcessFailedException]
The command “runuser ‘asterisk’ -s ‘/bin/bash’ -c ‘cd /var/www/html/admin/m
odules/pm2/node && mkdir -p /home/asterisk/.pm2 && mkdir -p /var/www/html/a
dmin/modules/pm2/node/logs && export HOME=/home/asterisk && export PM2_HOME
=/home/asterisk/.pm2 && export ASTLOGDIR=/var/log/asterisk && export ASTVAR
LIBDIR=/var/lib/asterisk && export PATH=$HOME/.node/bin:$PATH && export NOD
E_PATH=$HOME/.node/lib/node_modules:$NODE_PATH && export MANPATH=$HOME/.nod
e/share/man:$MANPATH && /var/www/html/admin/modules/pm2/node/node_modules/p
m2/bin/pm2 ping’” failed.

Exit Code: 1(General error)

Working directory: /root

Output:

Error Output:

module.js:338
throw err;
^
Error: Cannot find module ‘lodash/noop’
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/var/www/html/admin/modules/pm2/node/node_module
s/pm2/node_modules/async/internal/parallel.js:8:13)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)

[[email protected] ~]# fwconsole ma enable pm2
The following error(s) occured:

  • Module pm2 cannot be enabled

These are ssh commands, not Asterisk CLI commands.

1 Like

Thanks - I ran them both ways, still did not work (second was below the first).

In case anyone else runs into this same issue, the solution in my case was to run the following commands:

rm -Rf /home/asterisk/{.npm,.npmrc,.node-gyp,.package_cache}
rm -Rf /var/www/html/admin/modules/pm2/node/node_modules
fwconsole ma downloadinstall pm2

pm2 then successfully installed.

Thanks!

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.