Another problem updating pm2

Yesterday I had system where I couldn’t update pm2. This morning I ran into the same issue although the error outputs seem to be different.

I ran yum update -y, removed pm2 and tried to reinstall it and still receive this when I attempt to downloadinstall

[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: /

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)

Hi @mvogel4949

Pls try to fixing permissions on your PBX.

fwconsole chown

If not works. try 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

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