Pm2 Disabled pending update

Hello,

I seem to be unable to install/update pm2 the module. Im unsure how to resolve, would anyone be able to assist?

[[email protected] ~]# fwconsole ma listonline | grep pm2
| pm2 | 15.0.4 | Disabled; Pending upgrade to 15.0.6 | AGPLv3+ |
[[email protected] ~]#
[[email protected] ~]#
[[email protected] ~]#
[[email protected] ~]# fwconsole ma downloadinstall pm2
No repos specified, using: [standard] from last GUI settings
Downloading module ‘pm2’
Processing pm2
Verifying local module download…Verified
Extracting…Done
Download completed in 0 seconds
TypeError: Cannot destructure property stat of ‘undefined’ or ‘null’.
at Object. (/usr/lib/node_modules/npm/node_modules/@npmcli/node-gyp/lib/index.js:2:29)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/usr/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:4:55)
at Module._compile (module.js:653:30)
/usr/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:163
throw new Error(‘call config.load() before reading values’)
Error: call config.load() before reading values
at Config.get (/usr/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:163:13)
at process.errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:171:32)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:391:26)
Node Package Manager is not installed
Unable to install module pm2:
-Failed to run installation scripts
Updating Hooks…Done
Chowning directories…Done
[[email protected] ~]#

I do already have Nodejs

[[email protected] ~]# yum list nodejs
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
Installed Packages
nodejs.x86_64 2:8.16.0-1.11 @sng-pkgs/7
[[email protected] ~]#

So as per this topic, I have tried to reinstall nodejs

[[email protected] ~]# yum upgrade nodejs
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
No packages marked for update
[[email protected] ~]# yum remove nodejs*
Loaded plugins: fastestmirror, versionlock
Resolving Dependencies
→ Running transaction check
—> Package nodejs.x86_64 2:8.16.0-1.11 will be erased
→ Processing Dependency: nodejs for package: freepbx-14.1-1.sng7.noarch
→ Running transaction check
—> Package freepbx.noarch 0:14.1-1.sng7 will be erased
→ Processing Dependency: freepbx for package: sangoma-pbx-2012-1.sng7.noarch
→ Running transaction check
—> Package sangoma-pbx.noarch 0:2012-1.sng7 will be erased
→ Finished Dependency Resolution
Error: Trying to remove “sangoma-pbx”, which is protected
[[email protected] ~]# yum install nodejs
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
Package 2:nodejs-8.16.0-1.11.x86_64 already installed and latest version
Nothing to do
[[email protected] ~]#

But I’m unable to due to “sangoma-pbx”

off the top of my head…

rpm -e --no-deps --force nodejs

Also try going to

/var/www/html/admin/modules/pm2/node

and run

rm -rf node_modules
npm install
1 Like

Hi @jfinstrom

No joy with those commands, unfortunately.

Fraser

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