Can't install PM2 on FREEPBX 15


(Jack) #1
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 /var/lib/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
shell.js: internal error
Error: spawnSync /bin/sh EACCES
    at Object.spawnSync (internal/child_process.js:1002:20)
    at spawnSync (child_process.js:614:24)
    at Object.execSync (child_process.js:661:13)
    at execSync (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/exec.js:81:11)
    at Object._exec (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/exec.js:214:12)
    at Object.exec (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/common.js:182:23)
    at getNpmVersion (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:14:18)
    at getNpmMajorVersion (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:10:21)
    at getNpmConfigPath (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:28:7)
    at Object.<anonymous> (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:51:15)

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:

i have already delete cache and redownload files but still not work …
i have no idea,somebody could help me?


(Itzik) #2

What do you see in the log?


(Jack) #3

the same

cat /var/www/html/admin/modules/pm2/node/logs/install.log
[npm-cache] [INFO] using /var/lib/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
shell.js: internal error
Error: spawnSync /bin/sh EACCES
    at Object.spawnSync (internal/child_process.js:1002:20)
    at spawnSync (child_process.js:614:24)
    at Object.execSync (child_process.js:661:13)
    at execSync (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/exec.js:81:11)
    at Object._exec (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/exec.js:214:12)
    at Object.exec (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/common.js:182:23)
    at getNpmVersion (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:14:18)
    at getNpmMajorVersion (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:10:21)
    at getNpmConfigPath (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:28:7)
    at Object.<anonymous> (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:51:15)


(Dave Burgess) #4

Isn’t NPM a stand-alone dependency? IIRC, there was a time when we had to update it by hand to get something else to work (it could have been PM2).


(Jack) #6
npm -v
6.9.0
node -v
v10.16.3

npm and nodjs is the lastest version


(Dave Burgess) #7

Time to dive deeper. Check to make sure this file exists, is readable by Asterisk (the user), and that it looks like it makes sense.


(Jack) #9

the file does not exist. i try to delete all cache file also include npm cache file and then redownload ,the same problem.file does not exits…


(Dave Burgess) #10

I’d throw in a trouble ticket. This sounds like a problem with the PM2 package, and I don’t know who is responsible for making that work. The installation of the package should make sure that all required components are there.

When you did your install, did you use “force” on your install to make sure that all of the components overwrote your old pieces?


(Jack) #11
fwconsole ma downloadinstall pm2 --force
No repos specified, using: [standard,extended] from last GUI settings

Downloading module 'pm2'
Processing pm2
Downloading...
 24463/24463 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 10 seconds
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 /var/lib/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
shell.js: internal error
Error: spawnSync /bin/sh EACCES
    at Object.spawnSync (internal/child_process.js:1002:20)
    at spawnSync (child_process.js:614:24)
    at Object.execSync (child_process.js:661:13)
    at execSync (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/exec.js:81:11)
    at Object._exec (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/exec.js:214:12)
    at Object.exec (/var/lib/asterisk/.node/lib/node_modules/npm-cache/node_modules/shelljs/src/common.js:182:23)
    at getNpmVersion (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:14:18)
    at getNpmMajorVersion (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:10:21)
    at getNpmConfigPath (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:28:7)
    at Object.<anonymous> (/var/lib/asterisk/.node/lib/node_modules/npm-cache/cacheDependencyManagers/npmConfig.js:51:15)

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:
Updating Hooks...Done
Chowning directories...Done

i have tried it just now :frowning:


(Itzik) #12

Since v15 is still beta, it might be a bug.

But reports: issues.freepbx.org


(system) closed #13

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