Bonjour
Je n’arrive pas à installer / lancer le démon JeeZigbee.
J’ai installé et configuré MQTT manager, tout à l’air OK :
J’ai installé JeeZigbee, les dépendances sont installés sans message d’erreur mais le démon ne se lance pas.
Le fichiers z2md :
> zigbee2mqtt@1.35.3 start /var/www/html/plugins/z2m/resources/zigbee2mqtt
> node index.js
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module 'semver'
Require stack:
- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
at Object.<anonymous> (/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js' ]
}
Node.js v18.17.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.35.3 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.35.3 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-02-24T16_06_47_823Z-debug.log
Le fichier /root/.npm/_logs/2024-02-24T16_06_47_823Z-debug.log :
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start',
1 verbose cli '--prefix',
1 verbose cli '/var/www/html/plugins/z2m/resources/zigbee2mqtt'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v18.17.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle zigbee2mqtt@1.35.3~prestart: zigbee2mqtt@1.35.3
6 info lifecycle zigbee2mqtt@1.35.3~start: zigbee2mqtt@1.35.3
7 verbose lifecycle zigbee2mqtt@1.35.3~start: unsafe-perm in lifecycle true
8 verbose lifecycle zigbee2mqtt@1.35.3~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/html/plugins/z2m/resources/zigbee2mqtt/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle zigbee2mqtt@1.35.3~start: CWD: /var/www/html/plugins/z2m/resources/zigbee2mqtt
10 silly lifecycle zigbee2mqtt@1.35.3~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle zigbee2mqtt@1.35.3~start: Returned: code: 1 signal: null
12 info lifecycle zigbee2mqtt@1.35.3~start: Failed to exec start script
13 verbose stack Error: zigbee2mqtt@1.35.3 start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (node:events:514:28)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (node:events:514:28)
13 verbose stack at maybeClose (node:internal/child_process:1091:16)
13 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
14 verbose pkgid zigbee2mqtt@1.35.3
15 verbose cwd /var/www/html/core/ajax
16 verbose Linux 5.10.103-v7l+
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "start" "--prefix" "/var/www/html/plugins/z2m/resources/zigbee2mqtt"
18 verbose node v18.17.1
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error zigbee2mqtt@1.35.3 start: `node index.js`
22 error Exit status 1
23 error Failed at the zigbee2mqtt@1.35.3 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Quand je regarde les logs de z2m_packages je vois une erreur :
+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_z2m
+ echo 1
+ echo 2
+ sudo chmod +x /var/www/html/core/class/../../plugins/z2m/resources/pre-install.sh
+ sudo /var/www/html/core/class/../../plugins/z2m/resources/pre-install.sh
Launch pre-install of z2m dependancy
+ echo 3
+ sudo chmod +x /var/www/html/core/class/../../plugins/z2m/resources/post-install.sh
+ sudo /var/www/html/core/class/../../plugins/z2m/resources/post-install.sh
+ echo Launch post-install of z2m dependancy
Launch post-install of z2m dependancy
+ realpath /var/www/html/core/class/../../plugins/z2m/resources/post-install.sh
+ dirname /var/www/html/plugins/z2m/resources/post-install.sh
+ BASEDIR=/var/www/html/plugins/z2m/resources
+ [ -d /var/www/html/plugins/z2m/resources/zigbee2mqtt ]
+ rm -rf /var/www/html/plugins/z2m/resources/zigbee2mqtt
+ mkdir /var/www/html/plugins/z2m/resources/zigbee2mqtt
+ git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /var/www/html/plugins/z2m/resources/zigbee2mqtt
Cloning into '/var/www/html/plugins/z2m/resources/zigbee2mqtt'...
+ cd /var/www/html/plugins/z2m/resources/zigbee2mqtt
+ [ -f /var/www/html/plugins/z2m/resources/../data/wanted_z2m_version ]
+ npm ci
npm ERR! Cannot read properties of undefined (reading 'ajv')
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-02-24T15_41_22_232Z-debug.log
+ npm run build
> zigbee2mqtt@1.35.3 build /var/www/html/plugins/z2m/resources/zigbee2mqtt
> tsc && node index.js writehash
sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! zigbee2mqtt@1.35.3 build: `tsc && node index.js writehash`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.35.3 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-02-24T15_41_23_314Z-debug.log
+ chown www-data:www-data -R /var/www/html/plugins/z2m/resources/zigbee2mqtt
+ echo 4
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end z2m
+ rm /tmp/jeedom_install_in_progress_z2m
+ echo '*******************End of package installation******************'
*******************End of package installation******************
Je suis sur Debian Buster à jour et en Core: 4.3.22.
J’ai trouvé un post avec un erreur comparable mais la solution était d’upgrader le core et je sui déjà à jour.
Pourriez-vous m’aider à débloquer ce pb ?
Merci