New ucp install fails - error code 1 - command sh -c node-gyp rebuild failed

I’m building a fresh install of FreePBX 16 & Asterisk 18. Initial install went OK (eventually!) and I then installed about 12 modules via Admin/Module Admin, all OK.

Raspbian 12 Bookworm
FreePBX 16.0.40.7
Asterisk 18.21.0
Node v18.13.0
npm 9.2.0

A further module was dependent on ucp so I installed that with

sudo fwconsole ma install ucp

but it failed. There were 1,000 lines of error - see the end of this post.

A number of posts on this forum from 2020 said they solved it by downgrading Nodejs from v12 to v11 but I’m on v18, so I don’t known if I should downgrade to another version, if indeed that is the solution.

Looking at [Node.js — Previous Releases](https://Node.js release schedule it suggest to me that Node v18 should be on npm v10.2.3 (I’m on 9.2.0, which suggests an upgrade)

I have uninstalled, removed, downloaded and reinstalled npm and nodejs and uninstalled and reinstalled ucp only to get the same error.

Many thanks for reading.
Alan

[ignoring the downloading log entries]

e[Ke[?25hInstalled 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/ucp/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/ucp/node/package.json: 76ab6df0c1940daaf47b99501250de86
[npm-cache] [INFO] [npm] running [npm install]…
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated [email protected]: this package is deprecated please use GitHub - xmppjs/xmpp.js: XMPP for JavaScript
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: this package is deprecated please use GitHub - xmppjs/xmpp.js: XMPP for JavaScript
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub)
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request · GitHub
npm WARN deprecated [email protected]: this package is deprecated please use @xmpp/client - npm
npm ERR! code 1
npm ERR! path /var/www/html/admin/modules/ucp/node/node_modules/mariasql
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory ‘/var/www/html/admin/modules/ucp/node/node_modules/mariasql/build’
npm ERR! CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/aes.o
npm ERR! CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/aestables.o

you will probably have to be patient while sangoma moves to a fully open source solution (not going to happen) , or refrain from installing ‘commercial’ modules until you buy a license, currently expect turmoil on debian based systems :slight_smile:

Now fixed. Yesterday I was installing another module via terminal and continued to install ucp. That installed ucp 16.0.38.1 but also first installed npm with loads of errors. I uninstalled and installed again getting npm 9.2.0. A further attempt repeated the above so today I uninstall ucp.

Today I thought I would give it a final try and installed ucp 16.0.38.1 via FreePBX Admin Modules and it worked OK although there was a message “Failed updating libraries”. But the Dashboard did not show any errors and I have now added a user to the UCP and logged-in so it looks good so far.

Next step is to import my config from by current Asterisk 13 / FreePBX 13.

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