Bonjour,
Suite à une mauvaise manipulation j’ai du réinstaller mon Jeedom.
Je suis passé de Linux 10 à 11 et je suis passé de « OpenZwave » à « Zwave-JS ».
J’ai aussi réussi à faire fonctionner tous mes modules Zwave, par contre impossible d’accéder à l’interface :
Error: Not Found
at /var/www/html/plugins/zwavejs/resources/zwave-js-ui/server/app.js:1238:17
at Layer.handle [as handle_request] (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/index.js:328:13)
at /var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/index.js:346:12)
at next (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/index.js:280:10)
at session (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express-session/index.js:487:7)
at Layer.handle [as handle_request] (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/index.js:328:13)
at /var/www/html/plugins/zwavejs/resources/zwave-js-ui/node_modules/express/lib/router/index.js:286:9
Dans les dépendances j’ai cette erreur que je n’arrive pas à résoudre :
[5/5] Building fresh packages...
success Saved lockfile.
Done in 84.27s.
+ sudo yarn run build
yarn run v1.22.22
$ npm-run-all build:*
$ tsc
api/lib/logger.ts(96,49): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
api/lib/logger.ts(97,47): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:server" exited with 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
J’ai déjà redémarré avant de faire l’installation des dépendances, changer la commande pour utiliser moins de RAM, passer à la dernière version de « Zwave-JS » en modifiant le fichier .ini… bref je n’ai plus d’idée…
Votre profil indique que vous avez un pi2 ! L’installation des dépendances de ce plugin est déjà problématique avec un Pi3 et 1 go de mémoire RAM, alors avec un pi2…
J’ai eu la même erreur de dépendances cet après-midi sur mon Jeedom en Debian 11 (installé correctement ) et 4 Go de RAM.
Une autre personne également sur Debian 12 :
Bonjour,
J’ai la même chose depuis … Cela fait 2 ou 3 mois que je suis sur Z-wave JS au moment du basculement, j’avais accès à l’interface et depuis hier, j’ai essayé d’y accéder maisimpossible mais je n’y suis plus allé depuis que mon installation fonctionne correctement sur JS.
+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_zwavejs
+ echo 1
+ echo 2
+ sudo chmod +x /var/www/html/core/class/../../plugins/zwavejs/resources/pre_install.sh
+ sudo /var/www/html/core/class/../../plugins/zwavejs/resources/pre_install.sh
+ echo 'Pre installation de l'\''installation/mise à jour des dépendances zwavejs'
Pre installation de l'installation/mise à jour des dépendances zwavejs
+++ dirname /var/www/html/core/class/../../plugins/zwavejs/resources/pre_install.sh
++ cd /var/www/html/core/class/../../plugins/zwavejs/resources
++ pwd
+ BASEDIR=/var/www/html/plugins/zwavejs/resources
+ cd /var/www/html/plugins/zwavejs/resources
+ source ../core/config/zwavejs.config.ini
+ echo 'Wanted Version: 9.20.0'
Wanted Version: 9.20.0
+ rm -R zwave-js-ui
+ git clone --branch v9.20.0 --depth 1 https://github.com/zwave-js/zwave-js-ui
Cloning into 'zwave-js-ui'...
Note: switching to 'bf3bdc3f13d903cf100b0ba9c3333101ffd29418'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
+ echo 'Pre install finished'
Pre install finished
+ echo 3
+ php /var/www/html/core/class/../php/jeecli.php plugin install mqtt2
+ echo 4
+ sudo killall apt apt-get unattended-upgr
apt: no process found
apt-get: no process found
+ sudo rm /var/lib/apt/lists/lock
+ sudo rm /var/cache/apt/archives/lock
+ sudo rm /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
+ sudo sudo dpkg --configure -a --force-confdef
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 21.6 kB in 2s (12.0 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
135 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ echo 5
+ 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://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 6581 B in 3s (2351 B/s)
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).
git is already the newest version (1:2.30.2-1+deb11u3).
lsb-release is already the newest version (11.1.0+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 135 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 6
+ 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://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 6581 B in 2s (3658 B/s)
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).
git is already the newest version (1:2.30.2-1+deb11u3).
lsb-release is already the newest version (11.1.0+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 135 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 7
+ 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://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:4 https://pkgs.tailscale.com/stable/raspbian bullseye InRelease
Fetched 6581 B in 2s (4143 B/s)
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).
git is already the newest version (1:2.30.2-1+deb11u3).
lsb-release is already the newest version (11.1.0+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 135 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 8
+ 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-11-12 00:40:08-- 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% 3.30M 0s
50K ....... 100% 16.2M=0.02s
2024-11-12 00:40:08 (3.66 MB/s) - 'composer-setup.php' saved [58444/58444]
All settings correct for using Composer
Downloading...
Composer (version 2.8.2) successfully installed to: /var/www/html/core/ajax/composer.phar
Use it: php composer.phar
End installation of composer
+ echo 9
+ sudo NODE_OPTIONS=--dns-result-order=ipv4first npm install --force -g yarn
npm warn using --force Recommended protections disabled.
changed 1 package in 8s
+ echo 10
+ sudo chmod +x /var/www/html/core/class/../../plugins/zwavejs/resources/post_install.sh
+ sudo /var/www/html/core/class/../../plugins/zwavejs/resources/post_install.sh
+ echo 'Post installation de l'\''installation/mise à jour des dépendances zwavejs'
Post installation de l'installation/mise à jour des dépendances zwavejs
+++ dirname /var/www/html/core/class/../../plugins/zwavejs/resources/post_install.sh
++ cd /var/www/html/core/class/../../plugins/zwavejs/resources
++ pwd
+ BASEDIR=/var/www/html/plugins/zwavejs/resources
+ cd /var/www/html/plugins/zwavejs/resources
+ cd zwave-js-ui
+ sudo yarn install
yarn install v1.22.22
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning csurf@1.11.0: Please use another csrf package
warning native-url > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning vue@2.7.16: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
warning @types/extract-zip@2.0.3: This is a stub types definition. extract-zip provides its own type definitions, so you do not need this installed.
warning docsify-cli > docsify-server-renderer@4.13.1: docsify-server-renderer 4.x and below is no longer supported while we investigate the future of SSR and SSG for Docsify
warning eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
warning eslint > @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
warning eslint > @humanwhocodes/config-array > @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
warning eslint > file-entry-cache > flat-cache > rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning eslint > file-entry-cache > flat-cache > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning mocha > glob@8.1.0: Glob versions prior to v9 are no longer supported
warning mocha > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning release-it > shelljs > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning vite-plugin-pwa > workbox-build > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning vite-plugin-pwa > workbox-build > @rollup/plugin-replace > magic-string > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @zwave-js/log-transport-json@3.0.0" has unmet peer dependency "@zwave-js/core@>=10.0.0".
warning " > @zwave-js/log-transport-json@3.0.0" has unmet peer dependency "@zwave-js/shared@>=10.0.0".
warning " > @zwave-js/log-transport-json@3.0.0" has unmet peer dependency "winston-transport@^4.5.0".
warning " > vis-data@7.1.9" has unmet peer dependency "uuid@^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > vis-data@7.1.9" has unmet peer dependency "vis-util@^5.0.1".
warning " > vis-network@9.1.9" has unmet peer dependency "@egjs/hammerjs@^2.0.0".
warning " > vis-network@9.1.9" has unmet peer dependency "component-emitter@^1.3.0".
warning " > vis-network@9.1.9" has unmet peer dependency "keycharm@^0.2.0 || ^0.3.0 || ^0.4.0".
warning " > vis-network@9.1.9" has unmet peer dependency "uuid@^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > vis-network@9.1.9" has unmet peer dependency "vis-util@^5.0.1".
warning " > @babel/register@7.25.9" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > vite-plugin-pwa@0.20.5" has unmet peer dependency "workbox-build@^7.1.0".
warning " > vite-plugin-pwa@0.20.5" has unmet peer dependency "workbox-window@^7.1.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 223.70s.
+ sudo NODE_OPTIONS=--max_old_space_size=2048 yarn run build
yarn run v1.22.22
$ npm-run-all 'build:*'
$ tsc
api/lib/logger.ts(94,49): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
api/lib/logger.ts(95,47): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:server" exited with 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
+ chown -R www-data:www-data CHANGELOG.md LICENSE README.md SECURITY.md api certs docker docs esbuild-register.js esbuild.js genereteDocs.ts index.html kubernetes kustomization.yaml node_modules nodemon.json package-lock.json package.json package.sh pkg public server server_config.js snippets src store test tsconfig.eslint.json tsconfig.json vite.config.mjs wallaby.js yarn.lock
+ '[' -e /dev/ttyAMA0 ']'
+ sudo sed -i 's/console=ttyAMA0,115200//; s/kgdboc=ttyAMA0,115200//' /boot/cmdline.txt
+ sudo sed -i 's|[^:]*:[^:]*:respawn:/sbin/getty[^:]*ttyAMA0[^:]*||' /etc/inittab
sed: can't read /etc/inittab: No such file or directory
+ '[' -e /dev/ttymxc0 ']'
+ '[' -e /dev/ttyAMA0 ']'
+ sudo systemctl mask serial-getty@ttyAMA0.service
+ sudo systemctl stop serial-getty@ttyAMA0.service
++ grep Revision /proc/cpuinfo
++ cut -d: -f2
++ tr -d ' '
+ RPI_BOARD_REVISION=a02082
+ [[ a02082 == \8 ]]
+ systemctl disable hciuart
++ grep dtoverlay=pi3-miniuart-bt /boot/config.txt
+ [[ ! -n dtoverlay=pi3-miniuart-bt ]]
+ echo 'Everything is successfully installed!'
Everything is successfully installed!
+ echo 11
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end zwavejs
+ echo 12
+ rm /tmp/jeedom_install_in_progress_zwavejs
+ echo '*******************End of package installation******************'
*******************End of package installation******************
J’ai rebooté la machine, réinstallé les dépendances
de MQTT Manadger et de Z-wave JS, rebooté la machine mais toujours rien de plus…
Bon j’ai fini par réussir à le faire fonctionner, mais c’est clairement de la bidouille. Voici comment j’ai fait :
Lancement de l’installation des dépendances.
Pendant le ‹ sudo yarn install ›, modification du fichier ‹ /var/www/html/plugins/zwavejs/resources/zwave-js-ui/api/lib/logger.ts › pour commenter les lignes 94 et 95 (c’est pour les logs, on s’en fout un peu)
Bonjour, meme probleme de mon cote depuis plusieurs jours (sur rpi3b et rpi4) et meme en installant la dernière version de zwavejsui en 9.27.2 (via la modif du fichier html/plugins/zwavejs/core/config/zwavejs.config.ini): meme probleme. En plus les dépendances ont le status OK alors qu’il y a une erreur !
Merci pour l’idée de commenter les lignes qui bugs mais cette solution ne me plait pas sur le long terme !
Pour garder les logs, vous pouvez aussi faire ça dans /var/www/html/plugins/zwavejs/resources/zwave-js-ui/api/lib/logger.ts :
info.timestamp = colorizer.colorize('time', (info.timestamp as string))
info.label = colorizer.colorize('module', (info.label as string) || '-')
Pour cette modif c’est plutôt dans le fichier html/plugins/zwavejs/resources/zwave-js-ui/tsconfig.json
On aura ça alors (attention aux virgules):
{
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
// Necessary to support yarn portals with the node-modules linker, used by yarn link (berry)
"preserveSymlinks": true,
"resolveJsonModule": true,
"outDir": "server",
"noImplicitUseStrict": true,
// TODO: Turn this on and fix all the errors
"strict": false
},
"include": [
"api/**/*.ts",
],
}
J’avais tenté la même chose.
De toute façon ça n’explique pas pourquoi on pouvait avant compiler la 9.20 et que maintenant on ne peut plus.
Les fichiers tsconfig et logger n’ont pas été modifiés sur les lignes concernées depuis un bail non plus.
Pour itérer plus facilement et modifier le fichier pour les prochaines maj:
Dans plugins/zwavejs/resources/post_install.sh
ajouter à la ligne 10 (juste avant le sudo yarn install):
oldString1="info.timestamp = colorizer.colorize('time', info.timestamp)"
newString1="info.timestamp = colorizer.colorize('time', (info.timestamp as string))"
oldString2="info.label = colorizer.colorize('module', info.label || '-')"
newString2="info.label = colorizer.colorize('module', (info.label as string) || '-')"
chmod +w api/lib/logger.ts
sed -i "s/$oldString1/$newString1/g" api/lib/logger.ts
sed -i "s/$oldString2/$newString2/g" api/lib/logger.ts
Merci à vous pour les pistes!
Mais ça reste un problème du côté de la zwave-js-ui…
ÉDIT : on vient de me répondre que note problème n’a rien à voir.
Par contre on m’a également dit que yarn est déprécié et qu’il faut passer par npm (même avant la 9.20).
Merci pour les investigations et le retour d’information.
J’ai poussé une modification dans ce sens en beta à l’instant mais je n’ai pas pu tester en totalité, juste l’installation des dépendances qui semble aboutir:
0083|+ cd zwave-js-ui
0084|+ sudo npm install
xxxxxxxxxxx
0110|+ sudo npm run build
xxxxxxxxxxx
0208|✓ built in 12.32s
La modification apparaitra en installant la beta demain.
La il faut faire la modification à la main.
(dans plugins/zwavejs/resources/post_install.sh)
et relancer l’installation des dépendances.