L'installation des dépendances est KO

Bonjour,

Debian GNU/Linux 11 (bullseye)
Jeedom 4.4.17
Plugin mySensors (mySensors) stable 2023-10-26 01:02:00

Le plugin ne fonctionne plus chez moi et l’installation des dépendances est KO :

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_mySensors
+ echo 1
+ echo 2
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 https://deb.nodesource.com/node_20.x nodistro InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (2.2.4).
build-essential is already the newest version (12.9).
lsb-release is already the newest version (11.1.0).
git is already the newest version (1:2.30.2-1+deb11u3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[Check Version NodeJS actuelle : v20.17.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
Clean npm cache
npm warn using --force Recommended protections disabled.
+ echo 3
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 https://deb.nodesource.com/node_20.x nodistro InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (2.2.4).
build-essential is already the newest version (12.9).
lsb-release is already the newest version (11.1.0).
git is already the newest version (1:2.30.2-1+deb11u3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[Check Version NodeJS actuelle : v20.17.0 : [  OK  ]
[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [  OK  ]
Clean npm cache
npm warn using --force Recommended protections disabled.
+ echo 4
+ sudo chmod +x /var/www/html/core/class/../../resources/install_composer.sh
+ sudo /var/www/html/core/class/../../resources/install_composer.sh
Begin installation of composer
--2024-09-29 10:17:12--  https://getcomposer.org/installer
Resolving getcomposer.org (getcomposer.org)... 2001:41d0:302:1100::8:104f, 54.36.53.46
Connecting to getcomposer.org (getcomposer.org)|2001:41d0:302:1100::8:104f|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58444 (57K) [application/octet-stream]
Saving to: 'composer-setup.php'

     0K .......... .......... .......... .......... .......... 87% 2.45M 0s
    50K .......                                               100%  141M=0.02s

2024-09-29 10:17:12 (2.79 MB/s) - 'composer-setup.php' saved [58444/58444]

All settings correct for using Composer
Downloading...

Composer (version 2.7.9) successfully installed to: /var/www/html/core/ajax/composer.phar
Use it: php composer.phar

End installation of composer
+ echo 5
+ cd /var/www/html/core/class/../../plugins/mySensors/resources
+ rm -rf node_modules
+ sudo NODE_OPTIONS=--dns-result-order=ipv4first npm install
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated uuid@3.4.0: 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm error code 1
npm error path /var/www/html/plugins/mySensors/resources/node_modules/@serialport/bindings
npm error command failed
npm error command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm error make: Entering directory '/var/www/html/plugins/mySensors/resources/node_modules/@serialport/bindings/build'
npm error   CXX(target) Release/obj.target/bindings/src/serialport.o
npm error make: Leaving directory '/var/www/html/plugins/mySensors/resources/node_modules/@serialport/bindings/build'
npm error prebuild-install WARN install No prebuilt binaries found (target=20.17.0 runtime=node arch=x64 libc= platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@20.17.0 | linux | x64
npm error gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/var/www/html/plugins/mySensors/resources/node_modules/@serialport/bindings/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/root/.cache/node-gyp/20.17.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.17.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.17.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/var/www/html/plugins/mySensors/resources/node_modules/@serialport/bindings',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from ../../../nan/nan.h:178,
npm error                  from ../src/./serialport.h:13,
npm error                  from ../src/serialport.cpp:1:
npm error ../../../nan/nan_callbacks.h:55:23: error: 'AccessorSignature' is not a member of 'v8'
npm error    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm error       |                       ^~~~~~~~~~~~~~~~~
npm error ../../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
npm error    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm error       |                                        ^
npm error In file included from ../src/./serialport.h:13,
npm error                  from ../src/serialport.cpp:1:
npm error ../../../nan/nan.h: In function 'void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)':
npm error ../../../nan/nan.h:2551:16: error: no matching function for call to 'v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)'
npm error  2551 |     , signature);
npm error       |                ^
npm error In file included from /root/.cache/node-gyp/20.17.0/include/node/v8-function.h:15,
npm error                  from /root/.cache/node-gyp/20.17.0/include/node/v8.h:33,
npm error                  from /root/.cache/node-gyp/20.17.0/include/node/node.h:73,
npm error                  from ../../../nan/nan.h:58,
npm error                  from ../src/./serialport.h:13,
npm error                  from ../src/serialport.cpp:1:
npm error /root/.cache/node-gyp/20.17.0/include/node/v8-template.h:809:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
npm error   809 |   void SetAccessor(
npm error       |        ^~~~~~~~~~~
npm error /root/.cache/node-gyp/20.17.0/include/node/v8-template.h:814:22: note:   no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType'
npm error   814 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm error       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /root/.cache/node-gyp/20.17.0/include/node/v8-template.h:816:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
npm error   816 |   void SetAccessor(
npm error       |        ^~~~~~~~~~~
npm error /root/.cache/node-gyp/20.17.0/include/node/v8-template.h:821:22: note:   no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType'
npm error   821 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm error       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:78:51: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error    78 |   uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
npm error       |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:135:53: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   135 |   uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
npm error       |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:175:52: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   175 |   uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
npm error       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:215:52: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   215 |   uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
npm error       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:271:50: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   271 |   uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
npm error       |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:316:50: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   316 |   uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
npm error       |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:366:58: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   366 |   uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
npm error       |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)':
npm error ../src/serialport.cpp:412:52: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
npm error   412 |   uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
npm error       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../src/serialport.cpp: At global scope:
npm error ../src/serialport.cpp:433:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses]
npm error   433 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
npm error       |                            ^
npm error ../src/serialport.cpp:452:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses]
npm error   452 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
npm error       |                              ^
npm error In file included from ../../../nan/nan.h:58,
npm error                  from ../src/./serialport.h:13,
npm error                  from ../src/serialport.cpp:1:
npm error /root/.cache/node-gyp/20.17.0/include/node/node.h:1232:7: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
npm error  1232 |       (node::addon_register_func) (regfunc),                          \
npm error       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /root/.cache/node-gyp/20.17.0/include/node/node.h:1266:3: note: in expansion of macro 'NODE_MODULE_X'
npm error  1266 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm error       |   ^~~~~~~~~~~~~
npm error ../src/serialport.cpp:486:1: note: in expansion of macro 'NODE_MODULE'
npm error   486 | NODE_MODULE(serialport, init);
npm error       | ^~~~~~~~~~~
npm error make: *** [bindings.target.mk:111: Release/obj.target/bindings/src/serialport.o] Error 1
npm error gyp ERR! build error 
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Linux 5.10.0-32-amd64
npm error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /var/www/html/plugins/mySensors/resources/node_modules/@serialport/bindings
npm error gyp ERR! node -v v20.17.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-09-29T08_17_13_276Z-debug-0.log
+ sudo chown -R www-data:www-data dependencies.sh mysensors.js nodejs.sh package-lock.json package.json
+ echo 6
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mySensors
+ echo 7
+ rm /tmp/jeedom_install_in_progress_mySensors
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Je ne sais pas interpréter tous ces messages d’erreur, je pense que tout est à jour pourtant.

Si vous avez une idée ?

Merci :+1:

Ny aurait il pas une version beta en cours

merci pour cette piste mais j’ai aussi tenté d’installer en beta, elle est du 2023-10-26 01:02:00 et j’ai strictement la même stack d’erreur :eyes:

Ok j’ai trouvé : ça vient de la montée de version de NodeJS 18 → 20 avec le core Jeedom 4.4.17 :eyes:

Pour résoudre temporairement le soucis j’ai modifié le fichier core /resources/install_nodejs.sh

installVer='18'         #NodeJS major version to be installed
minVer='18'           #min NodeJS major version to be accepted

A voir pour une correction au niveau du plugin, je ne sais pas si il est toujours maintenu :thinking:

J’ai poussé une issue sur le repo GitHub.

Je confirme que j’ai exactement le même problème : depuis la version Jeedom 4.4.17 les dépendances ne s’installent plus correctement avec les mêmes erreurs que celles contenues dans la log de Dough29.

bon, ba moi aussi le plugin mysensors ne fonctionne plus !
même problème que @Dough29
par contre en SSH j’y connais pas grand chose.
j’ai cherché le fichier install_nodes.sh
chez moi il n’est pas dans le dossier core/resources mais dans resources (sans rentrer dans core)
j’ai modifier pour la version 18, mais les dépendances trouvent toujours la version 20 …
ya quelque chose que j’ai pas du faire !