UCP installation fails

UCP installation fails, I do not understand why.

I tried :

fwconsole ma delete ucp
rm -Rf /var/lib/asterisk/{.package_cache,.node,.node-gy,.node}
fwconsole setting PM2USECACHE 0
fwconsole setting PM2USEPROXY 0
fwconsole ma downloadinstall ucp --edge

Log :

# fwconsole ma downloadinstall ucp --edge
Edge repository already enabled, ignoring option
No repos specified, using: [standard,extended,unsupported,unknown] from last GUI settings

Downloading module 'ucp'
Processing ucp
Verifying local module download...Verified
Extracting...Done
Download completed in 2 seconds
Updating tables ucp_sessions...Terminé
Système : debian
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 tarball tarball data for [email protected]://github.com/dodo/reconnect-core/tarball/merged (sha1-udryrcRbGabMX9LwSPjZQGzs5Jg=) seems to be corrupted. Trying again.
npm WARN tarball tarball data for [email protected]://github.com/dodo/reconnect-core/tarball/merged (sha1-udryrcRbGabMX9LwSPjZQGzs5Jg=) seems to be corrupted. Trying again.
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /var/lib/asterisk/.npm/_cacache/content-v2/sha1/b9/da/f2adc45b19a6cc5fd2f048f8d9406cece498
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat '/var/lib/asterisk/.npm/_cacache/content-v2/sha1/b9/da/f2adc45b19a6cc5fd2f048f8d9406cece498'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /var/lib/asterisk/.npm/_logs/2021-08-02T14_38_33_548Z-debug.log

Failed updating libraries!
Stopping old running processes...Terminé
Refreshing all UCP Assets, this could take a while...
Generating Module Scripts...Terminé
Generating Module CSS...Terminé
Generating Main Scripts...Terminé
Generating Main CSS...Terminé
Done!
Génération des CSS...Terminé
Module ucp version 15.0.7 successfully installed
Updating Hooks...Terminé
Chowning directories...Done

Versions :

Debian 10
FreePBX 15.0.17.43
Asterisk 16.6.2
Node v12.15.0
npm 7.19.1

I had a similar problem. It happened after an update (of several modules) using the module admin failed.

fwconsole ma remove ucp --force
rm -rf /home/asterisk/.package_cache/npm/
rm -rf /home/asterisk/.npm
fwconsole ma downloadinstall ucp 

I adapted the code mbrooks posted here:

Thanks for your answer, I now get a different error involving mariadb, I’m looking into that :

# fwconsole ma remove ucp --force
# rm -Rf /var/lib/asterisk/.npm
# fwconsole ma downloadinstall ucp
No repos specified, using: [standard,extended,unsupported,unknown] from last GUI settings

Downloading module 'ucp'
Processing ucp
Verifying local module download...Verified
Extracting...Done
Download completed in 3 seconds
Updating tables ucp_sessions...Terminé
Système : debian
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
npm WARN deprecated [email protected]: This version of 'is-buffer' is out-of-date. You must update to v1.1.6 or newer
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm notice
npm notice New minor version of npm available! 7.19.1 -> 7.20.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.20.3
npm notice Run npm install -g [email protected] to update!
npm notice
Installed npm-cache v0.7.0
Running installation..
[npm-cache] [INFO] using /var/lib/asterisk/.package_cache as cache directory
[npm-cache] [INFO] creating cache directory
[npm-cache] [INFO] [composer] Dependency config file /opt/freepbx/www/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 /opt/freepbx/www/admin/modules/ucp/node/package.json: 76ab6df0c1940daaf47b99501250de86
[npm-cache] [INFO] [npm] running [npm install]...
npm WARN deprecated [email protected]: this package is deprecated please use https://github.com/xmppjs/xmpp.js
npm WARN deprecated [email protected]: this library is no longer supported
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. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: this package is deprecated please use https://github.com/xmppjs/xmpp.js
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. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
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 https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Use uuid module instead
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. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this package is deprecated please use https://www.npmjs.com/package/@xmpp/client
npm ERR! code 1
npm ERR! path /opt/freepbx/www/admin/modules/ucp/node/node_modules/mariasql
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make : on entre dans le répertoire « /opt/freepbx/www/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
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/algebra.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/arc4.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/asn.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/bftables.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/blowfish.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/coding.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/des.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/dh.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/dsa.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/file.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/hash.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/hc128.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/integer.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/md2.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/md4.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/md5.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/misc.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/rabbit.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/random.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/ripemd.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/rsa.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/sha.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/tftables.o
npm ERR!   CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/twofish.o
npm ERR!   AR(target) Release/obj.target/deps/libmariadbclient/extra/yassl/taocrypt/taocrypt.a
npm ERR!   COPY Release/taocrypt.a
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/buffer.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/cert_wrapper.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/crypto_wrapper.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/handshake.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/lock.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/log.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/socket_wrapper.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/ssl.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/timer.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/yassl_error.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/yassl_imp.o
npm ERR!   CXX(target) Release/obj.target/yassl/deps/libmariadbclient/extra/yassl/src/yassl_int.o
npm ERR!   AR(target) Release/obj.target/deps/libmariadbclient/extra/yassl/yassl.a
npm ERR!   COPY Release/yassl.a
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/sql-common/client.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/sql-common/client_plugin.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/sql-common/mysql_async.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/sql-common/my_time.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/sql-common/pack.o
npm ERR!   CXX(target) Release/obj.target/clientlib/deps/libmariadbclient/sql/net_serv.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/sql/password.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/libmysql/errmsg.o
npm ERR!   CC(target) Release/obj.target/clientlib/deps/libmariadbclient/libmysql/libmysql.o
npm ERR!   AR(target) Release/obj.target/deps/libmariadbclient/libmysql/clientlib.a
npm ERR!   COPY Release/clientlib.a
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/array.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/charset-def.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/charset.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/errors.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/hash.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/list.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_arr_appstr.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_dirname.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_fn_ext.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_format.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_loadpath.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_pack.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_path.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_qsort.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_unixpath.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mf_wcomp.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/mulalloc.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_access.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_alloc.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_compress.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_context.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_default.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_div.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_error.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_fopen.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_fstream.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_getsystime.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_getwd.o
npm ERR!   CC(target) Release/obj.target/mysys/deps/libmariadbclient/mysys/my_init.o
npm ERR![npm-cache] [ERROR] [npm] error running npm install
[npm-cache] [ERROR] error installing dependencies

Failed updating libraries!
Stopping old running processes...Terminé
Refreshing all UCP Assets, this could take a while...
Generating Module Scripts...Terminé
Generating Module CSS...Terminé
Generating Main Scripts...Terminé
Generating Main CSS...Terminé
Done!
Génération des CSS...Terminé
Module ucp version 15.0.7 successfully installed
Updating Hooks...Terminé
Chowning directories...Done

Found the same error in this post : UCP - error during installation

My node version was too high. I downgraded it to v11 instead of v12.

Thanks for the help @Charles_Darwin !

1 Like

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