Unable to install module pm2

Was performing my usual updates on my system and it failed. Tried to do " fwconsole ma downloadinstall pm2" manually and I get the below error.

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

Starting pm2 download…
Processing pm2
Verifying local module download…Verified
Extracting…Done
Module pm2 successfully downloaded
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: 5779f23338cdda82e1a9b20b2c91dde3
[npm-cache] [INFO] [npm] cache exists
[npm-cache] [INFO] [npm] clearing installed dependencies at /var/www/html/admin/modules/pm2/node/node_modules
/home/asterisk/.node/lib/node_modules/npm-cache/node_modules/rimraf/rimraf.js:46
throw Error('glob dependency not found, set options.disableGlob = true i
^
Error: glob dependency not found, set options.disableGlob = true if intentional
at Error (native)
at defaults (/home/asterisk/.node/lib/node_modules/npm-cache/node_modules/rimraf/rimraf.js:46:11)
at Function.rimrafSync (/home/asterisk/.node/lib/node_modules/npm-cache/node_modules/rimraf/rimraf.js:272:3)
at Object.removeSync (/home/asterisk/.node/lib/node_modules/npm-cache/node_modules/fs-extra/lib/remove/index.js:4:17)
at CacheDependencyManager.installCachedDependencies (/home/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/cacheDependencyManager.js:157:6)
at CacheDependencyManager.loadDependencies (/home/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/cacheDependencyManager.js:229:10)
at startManager (/home/asterisk/.node/lib/node_modules/npm-cache/index.js:117:15)
at /home/asterisk/.node/lib/node_modules/npm-cache/node_modules/async/lib/async.js:181:20
at Object.async.forEachOf.async.eachOf (/home/asterisk/.node/lib/node_modules/npm-cache/node_modules/async/lib/async.js:233:13)
at Object.async.forEach.async.each (/home/asterisk/.node/lib/node_modules/npm-cache/node_modules/async/lib/async.js:209:22)

Finished updating libraries!

There was an error installing. Please review the install log. (/var/www/html/admin/modules/pm2/node/logs/install.log)
Unable to install module pm2:

  • Failed to run installation scripts
    Updating Hooks…Done
glob seems to be installed:
[email protected] node_modules/glob
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected])

Freepbx version is 13

Any ideas?
Thanks!

Same issue here

Same issue here, still cannot get things to work right.

I ended up spending several hours on this to figure it out. I’ll do my best to remember how I fixed it. Glob from what I could see is a node.js function that works like rm -f, aka remove files. I went to the directory where it failed and just deleted the zipped files. Unfortunately, I don’t remember if they were zip, tgz, or gz. Doing so bypassed the glob error. After that was fixed I had problems with minimatch. Where that failed I just copped the code from another location on the system to the one where the issue was. Freepbx has lots of duplicate copies of code, I found.

I’m sorry I don’t have better details. It was a situation where I just pounded through the problem and it finally worked. I just didn’t log every step.

just keep doing “fwconsole ma downloadinstall pm2 -f” and look at the errors carefully. Follow the path of the error and deal with each step.

Now I’m just afraid to run update again :grimacing:

Good luck.

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