Hello everybody,
I am trying to upgrade/update the FreePBX local installation I have and it always asks to update the pm2 before to the rest update.
Unfortunately the pm2 is not possible to be installed. I will give you the rest tech information in case someone will be available to give me a solution.
Hardware : Raspberry pi 3
Distribution : RasPBX
LInux : raspbian
root@raspbx:~# cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 8 (jessie)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“8”
VERSION=“8 (jessie)”
ID=raspbian
ID_LIKE=debian
FreePBX : 14.0.17
node -v : 10.24.0
nodejs :10.24.0
-------Installation procedure---------
-1rst Attempt. From the Web Interface
The pm2 is not installed at all. The local ( not installed version is 13.0.7.2
When I try to install from the web interface of FreePBX I get the following error
Installing pm2
Installing/Updating Required Libraries. This may take a while…Running installation… …
Finished updating libraries!
There was an error installing. Please review the install log. (/var/www/html/admin/modules/pm2/node/logs/install.log)
Error(s) installing pm2:
- Failed to run installation scripts
Updating Hooks…Done
=========================================================
2nd Attempt. from the cli
I run the “fwconsole ma upgradeall” command and I get the following output :
root@raspbx:~# fwconsole ma upgradeall
No repos specified, using: [standard,extended] from last GUI settings
Module(s) requiring upgrades: ucp, webrtc
Upgrading module ‘ucp’ from 14.0.4 to 14.0.4
Downloading module ‘ucp’
Processing ucp
Verifying local module download…Verified
Extracting…Done
Download completed in 3 seconds
Detected Missing Dependency of: pm2 13.0.3.18
Found local Dependency of: pm2 13.0.7.2
Installing Missing Dependency of: pm2 13.0.3.18
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 npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can’t make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at htt ps://nodejs.org/
npm ERR! code Z_DATA_ERROR
npm ERR! errno Z_DATA_ERROR
npm ERR! Invalid response body while trying to fetch http s://registry.npmjs.org/async: invalid distance too far back
npm ERR! A complete log of this run can be found in:
npm ERR! /var/lib/asterisk/.npm/_logs/2024-04-08T08_50_02_658Z-debug.log
Finished updating libraries!
There was an error installing. Please review the install log. (/var/www/html/admin/modules/pm2/node/logs/install.log)
The following error(s) occured:
- Failed to run installation scripts
Unable to resolve dependencies for module ucp:
Updating Hooks…Done
Upgrading module ‘webrtc’ from 14.0.3.11 to 14.0.3.11
Downloading module ‘webrtc’
Processing webrtc
Verifying local module download…Verified
Extracting…Done
Download completed in 7 seconds
Detected Missing Dependency of: ucp 12.0.0beta7
Found local Dependency of: ucp 14.0.4
Detected Missing Dependency of: pm2 13.0.3.18
Found local Dependency of: pm2 13.0.7.2
Installing Missing Dependency of: pm2 13.0.3.18
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 npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can’t make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at ht tps://nodejs.org/
npm ERR! code Z_DATA_ERROR
npm ERR! errno Z_DATA_ERROR
npm ERR! Invalid response body while trying to fetch htt ps://registry.npmjs.org/chalk: invalid distance too far back
npm ERR! A complete log of this run can be found in:
npm ERR! /var/lib/asterisk/.npm/_logs/2024-04-08T08_57_20_040Z-debug.log
Finished updating libraries!
There was an error installing. Please review the install log. (/var/www/html/admin/modules/pm2/node/logs/install.log)
The following error(s) occured: - Failed to run installation scripts
Unable to resolve dependencies for module webrtc:
Updating Hooks…Done
All upgrades completed successfully!
Updating Hooks…Done
========================================
========================================
The error log file shows the following
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can’t make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at ht tps://nodejs.org/
npm ERR! code Z_DATA_ERROR
npm ERR! errno Z_DATA_ERROR
npm ERR! Invalid response body while trying to fetch htt ps://registry.npmjs.org/chokidar: invalid distance too far back
npm ERR! A complete log of this run can be found in:
npm ERR! /var/lib/asterisk/.npm/_logs/2024-04-08T09_56_52_881Z-debug.log
root@raspbx:~# vi /var/lib/asterisk/.npm/_logs/2024-04-08T09_56_52_881Z-debug.log
57 silly pacote range manifest for yamljs@^0.3.0 fetched in 524ms
58 silly resolveWithNewModule [email protected] checking installable status
59 silly fetchPackageMetaData error for pmx@^1.6 Invalid response body while trying to fetch htt ps://registry.npmjs.org/pmx: invalid distance too far back
60 silly fetchPackageMetaData error for v8-compile-cache@^1.1.0 Invalid response body while trying to fetch ht tps://registry.npmjs.org/v8-compile-cache: invalid distance too far back
61 silly saveTree [email protected]
61 silly saveTree └─┬ [email protected]
61 silly saveTree ├── [email protected]
61 silly saveTree ├── [email protected]
61 silly saveTree ├── [email protected]
61 silly saveTree ├── [email protected]
61 silly saveTree └── [email protected]
62 verbose type system
63 verbose stack FetchError: Invalid response body while trying to fetch htt ps://registry.npmjs.org/chokidar: invalid distance too far back
63 verbose stack at DestroyableTransform.body.on.err (/usr/share/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js:195:14)
63 verbose stack at DestroyableTransform.emit (events.js:198:13)
63 verbose stack at err (/usr/share/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:191:31)
63 verbose stack at /usr/lib/nodejs/pump/index.js:75:7
63 verbose stack at f (/usr/lib/nodejs/once/once.js:25:25)
63 verbose stack at WriteStream. (/usr/lib/nodejs/pump/index.js:31:21)
63 verbose stack at WriteStream.f (/usr/lib/nodejs/once/once.js:25:25)
63 verbose stack at WriteStream.onclose (/usr/lib/nodejs/end-of-stream/index.js:48:54)
63 verbose stack at WriteStream.emit (events.js:203:15)
63 verbose stack at WriteStream.destroy (/usr/lib/nodejs/flush-write-stream/index.js:53:8)
63 verbose stack at /usr/lib/nodejs/pump/index.js:45:45
63 verbose stack at call (/usr/lib/nodejs/pump/index.js:52:3)
63 verbose stack at Array.forEach ()
63 verbose stack at /usr/lib/nodejs/pump/index.js:72:25
63 verbose stack at f (/usr/lib/nodejs/once/once.js:25:25)
63 verbose stack at Gunzip. (/usr/lib/nodejs/pump/index.js:31:21)
64 verbose cwd /var/www/html/admin/modules/pm2/node
65 verbose Linux 4.9.35-v7+
66 verbose argv “/usr/bin/node” “/usr/bin/npm” “install” “–only=production”
67 verbose node v10.24.0
68 verbose npm v5.8.0
69 error code Z_DATA_ERROR
70 error errno Z_DATA_ERROR
71 error Invalid response body while trying to fetch htt ps://registry.npmjs.org/chokidar: invalid distance too far back
72 verbose exit [ 1, true ]
========================================
Any idea ?
I think I might have to downgrade the node version but I do not know how to do it.
Thank you for your time anyway.