Gettting error in new Freepbx asterik 21 setup - In Pm2.class.php Everywhere

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

I have tried fwconsole ma install core but getting error
~# fwconsole ma install core 2 -f

In Pm2.class.php line 303:
There is no process by that name

please ensure you have pm2 process running in your system.
try to install pm2 module.

Its just get stuck here

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
Running installation..
npm WARN config only Use --omit=dev to omit dev dependencies from the install

Though i am able to see the GUI but the error in Dashboard whenever i click on it.
ERROR:

pm2 binary does not exist run fwconsole ma install pm2 and try again
File:/var/www/html/admin/modules/pm2/Pm2Apps.php:260

I tried checking the PM2 module and its there already. at /var/www/html/admin/modules/pm2

ERROR in installing pm2:

The command “runuser ‘asterisk’ -s ‘/bin/bash’ -c ‘cd /var/www/html/admin/modules/pm2/node && mkdir -p /home/asterisk/.pm2 && mkdir -p /var/www/html/admin/modules/
pm2/node/logs && export HOME=/home/asterisk && export PM2_HOME=/home/asterisk/.pm2 && export ASTLOGDIR=/var/log/asterisk && export ASTVARLIBDIR=/var/lib/asterisk &
& export PATH=$HOME/.node/bin:$PATH && export NODE_PATH=$HOME/.node/lib/node_modules:$NODE_PATH && export MANPATH=$HOME/.node/share/man:$MANPATH && /var/www/html/a
dmin/modules/pm2/node/node_modules/pm2/bin/pm2 ping’” failed.

Exit Code: 1(General error)

Working directory: /root

Output:

Error Output:

node:internal/modules/cjs/loader:445
throw err;
^

Error: Cannot find module ‘/var/www/html/admin/modules/pm2/node/node_modules/fclone/dist/fclone’. Please verify that the package.json has a valid “main” entry
at tryPackage (node:internal/modules/cjs/loader:437:19)
at Module._findPath (node:internal/modules/cjs/loader:705:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:1120:27)
at Module._load (node:internal/modules/cjs/loader:975:27)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object. (/var/www/html/admin/modules/pm2/node/node_modules/pm2/lib/API.js:16:21)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32) {
code: ‘MODULE_NOT_FOUND’,
path: ‘/var/www/html/admin/modules/pm2/node/node_modules/fclone/package.json’,
requestPath: ‘fclone’
}

Node.js v18.19.0

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