Plugin MQTT erreur Axios

Bonsoir,

depuis que j’ai fait la mise a jour du plugin MQTT2 (2023-10-05 09:44:08) mon démon ne démarre plus.
J’ai supprimé le dossier node_modules au moins deux fois et réinstallé les dépendances en vain.

Log :

/var/www/html/plugins/mqtt2/resources/mqtt2d/node_modules/axios/index.js:1
import axios from './lib/axios.js';
^^^^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/var/www/html/plugins/mqtt2/resources/mqtt2d/jeedom/jeedom.js:17:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
internal/modules/cjs/loader.js:638
throw err;
^

Et le log d’installation des dépendances :

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_mqtt2
+ 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://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 2400:52e0:1e02::1072:1 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u8).
lsb-release is already the newest version (10.2019051400+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 477 not upgraded.
[Check Version NodeJS actuelle : v10.24.0 : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 https://download.docker.com/linux/debian buster InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 2400:52e0:1e02::1072:1 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 477 not upgraded.
Need to get 0 B/6005 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Selecting previously unselected package libc-ares2:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 195870 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.14.0-1+deb10u4_armhf.deb ...
Unpacking libc-ares2:armhf (1.14.0-1+deb10u4) ...
Selecting previously unselected package libnode64:armhf.
Preparing to unpack .../libnode64_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking nodejs (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.24.0~dfsg-1~deb10u3_all.deb ...
Unpacking nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up libc-ares2:armhf (1.14.0-1+deb10u4) ...
Setting up libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs (10.24.0~dfsg-1~deb10u3) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v10.24.0 : [  KO  ] -> relancez les dépendances
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ 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://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:3 https://download.docker.com/linux/debian buster InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 2400:52e0:1e02::1072:1 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u8).
lsb-release is already the newest version (10.2019051400+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 477 not upgraded.
[Check Version NodeJS actuelle : v10.24.0 : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 2400:52e0:1e02::1072:1 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 477 not upgraded.
Need to get 0 B/6005 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Selecting previously unselected package libc-ares2:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 195870 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.14.0-1+deb10u4_armhf.deb ...
Unpacking libc-ares2:armhf (1.14.0-1+deb10u4) ...
Selecting previously unselected package libnode64:armhf.
Preparing to unpack .../libnode64_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking nodejs (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.24.0~dfsg-1~deb10u3_all.deb ...
Unpacking nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up libc-ares2:armhf (1.14.0-1+deb10u4) ...
Setting up libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs (10.24.0~dfsg-1~deb10u3) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v10.24.0 : [  KO  ] -> relancez les dépendances
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ echo 4
+ cd /var/www/html/core/class/../../plugins/mqtt2/resources/mqtt2d
+ rm -rf node_modules
+ sudo npm install
added 110 packages, and audited 111 packages in 13s
13 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
+ chown -R www-data:www-data jeedom mqtt2d.js node_modules package-lock.json package.json
+ echo 5
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mqtt2
Synchronizing state of mosquitto.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mosquitto
+ rm /tmp/jeedom_install_in_progress_mqtt2
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Merci.

Bonjour
Y’a un soucis au niveau os nodejs n’arrive pas à se mettre à jour. Malheureusement tu ne mets pas tous ce que demande le post qui explique quoi mettre pour recevoir de l’aide je ne peux donc pas aller plus loin dans l’analyse

Désolé je me doutais bien que je n’avais pas donné assez d’infos.

Jeedom : 4.3.17 sur un Pi 2 et un disque SSD
OS : Linux jeedom 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux [10.9]
(debian 10.9)

Manque t’il d’autres informations ?

Oui toujours la page santé par exemple. Remplis le post qui dit quoi mettre c’est le plus simple.

désolé je ne trouve pas le post dont tu parles.

Voici ma page santé :

Bonjour
Ok j’ai les info que je voulais. Je suis pas sur a 100% mais je vois :

  • soit un soucis dans les sources apt
  • soit un soucis avec la version de debian, 10 c’est un peu vieux faudrait 11

Bonsoir Loïc.

Sauf que tous les plugins officiels ne sont pas compatibles Debian 11, au risque de me répéter (dans le vide) BLEA n’est pas compatible Debian 11.

Plusieurs tickets ont été ouverts pour cela, restés sans réponse.

1 « J'aime »

Donc il vaut mieux ne pas passer en Debian 11 ?
Quel autre solution ais je ? Monter en version mon node.js ?

Ça dépend des autres plugins que vous avez
Il faut vérifier s’ils sont compatibles ou pas.

Le problème que vous avez n’est pas lié à debian 10, mais peut-être plus a la distribution que vous avez sur votre pi2.
Je suis sur debian 10 à cause de blea et je n’ai pas se problème.

A tout hasard, je ne garanti rien la dessus, mais comme il semble que votre machine à des difficultés à joindre les dépôts en ipv6, désactivez l’ipv6 au niveau système et réessayez.

un problème qui ressemble ici:

J’ai désactivé ipv6 , supprimé le dossier nodes_module réinstallé les dépendances et ce n’est pas mieux.
Toujours l’erreur sur l’import d’Axios

on peut voir le nouveau log du coup?

Le log pour l’installation des dépendances :

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_mqtt2
+ 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://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.51 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u8).
lsb-release is already the newest version (10.2019051400+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 477 not upgraded.
[Check Version NodeJS actuelle : v10.24.0 : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.49 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 477 not upgraded.
Need to get 0 B/6005 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Selecting previously unselected package libc-ares2:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 195870 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.14.0-1+deb10u4_armhf.deb ...
Unpacking libc-ares2:armhf (1.14.0-1+deb10u4) ...
Selecting previously unselected package libnode64:armhf.
Preparing to unpack .../libnode64_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking nodejs (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.24.0~dfsg-1~deb10u3_all.deb ...
Unpacking nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up libc-ares2:armhf (1.14.0-1+deb10u4) ...
Setting up libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs (10.24.0~dfsg-1~deb10u3) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v10.24.0 : [  KO  ] -> relancez les dépendances
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ 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://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.49 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u8).
lsb-release is already the newest version (10.2019051400+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 477 not upgraded.
[Check Version NodeJS actuelle : v10.24.0 : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.50 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 477 not upgraded.
Need to get 0 B/6005 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Selecting previously unselected package libc-ares2:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 195870 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.14.0-1+deb10u4_armhf.deb ...
Unpacking libc-ares2:armhf (1.14.0-1+deb10u4) ...
Selecting previously unselected package libnode64:armhf.
Preparing to unpack .../libnode64_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking nodejs (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.24.0~dfsg-1~deb10u3_all.deb ...
Unpacking nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up libc-ares2:armhf (1.14.0-1+deb10u4) ...
Setting up libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs (10.24.0~dfsg-1~deb10u3) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v10.24.0 : [  KO  ] -> relancez les dépendances
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ echo 4
+ cd /var/www/html/core/class/../../plugins/mqtt2/resources/mqtt2d
+ rm -rf node_modules
+ sudo npm install
added 110 packages, and audited 111 packages in 14s
13 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
+ chown -R www-data:www-data jeedom mqtt2d.js node_modules package-lock.json package.json
+ echo 5
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mqtt2
Synchronizing state of mosquitto.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mosquitto
+ rm /tmp/jeedom_install_in_progress_mqtt2
+ echo '*******************End of package installation******************'
*******************End of package installation******************

et celui pour le démarrage :

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_mqtt2
+ 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://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.51 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u8).
lsb-release is already the newest version (10.2019051400+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 477 not upgraded.
[Check Version NodeJS actuelle : v10.24.0 : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.49 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 477 not upgraded.
Need to get 0 B/6005 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Selecting previously unselected package libc-ares2:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 195870 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.14.0-1+deb10u4_armhf.deb ...
Unpacking libc-ares2:armhf (1.14.0-1+deb10u4) ...
Selecting previously unselected package libnode64:armhf.
Preparing to unpack .../libnode64_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking nodejs (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.24.0~dfsg-1~deb10u3_all.deb ...
Unpacking nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up libc-ares2:armhf (1.14.0-1+deb10u4) ...
Setting up libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs (10.24.0~dfsg-1~deb10u3) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v10.24.0 : [  KO  ] -> relancez les dépendances
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ 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://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.49 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (1.8.2.3).
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u8).
lsb-release is already the newest version (10.2019051400+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 477 not upgraded.
[Check Version NodeJS actuelle : v10.24.0 : [  KO  ]
Installation de NodeJS 16
Utilisation du dépot officiel
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:4 https://download.docker.com/linux/debian buster InRelease
Get:5 https://deb.nodesource.com/node_12.x stretch InRelease [4585 B]
Ign:6 https://packages.sury.org/php $ InRelease
Err:7 https://packages.sury.org/php $ Release
404  Not Found [IP: 143.244.56.50 443]
Reading package lists...
E: The repository 'https://packages.sury.org/php $ Release' does not have a Release file.
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 477 not upgraded.
Need to get 0 B/6005 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Selecting previously unselected package libc-ares2:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 195870 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.14.0-1+deb10u4_armhf.deb ...
Unpacking libc-ares2:armhf (1.14.0-1+deb10u4) ...
Selecting previously unselected package libnode64:armhf.
Preparing to unpack .../libnode64_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.24.0~dfsg-1~deb10u3_armhf.deb ...
Unpacking nodejs (10.24.0~dfsg-1~deb10u3) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.24.0~dfsg-1~deb10u3_all.deb ...
Unpacking nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up libc-ares2:armhf (1.14.0-1+deb10u4) ...
Setting up libnode64:armhf (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs-doc (10.24.0~dfsg-1~deb10u3) ...
Setting up nodejs (10.24.0~dfsg-1~deb10u3) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[Check Version NodeJS après install : v10.24.0 : [  KO  ] -> relancez les dépendances
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ echo 4
+ cd /var/www/html/core/class/../../plugins/mqtt2/resources/mqtt2d
+ rm -rf node_modules
+ sudo npm install
added 110 packages, and audited 111 packages in 14s
13 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
+ chown -R www-data:www-data jeedom mqtt2d.js node_modules package-lock.json package.json
+ echo 5
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mqtt2
Synchronizing state of mosquitto.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mosquitto
+ rm /tmp/jeedom_install_in_progress_mqtt2
+ echo '*******************End of package installation******************'
*******************End of package installation******************

mauvais copier/coller

/var/www/html/plugins/mqtt2/resources/mqtt2d/node_modules/axios/index.js:1
import axios from './lib/axios.js';
^^^^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/var/www/html/plugins/mqtt2/resources/mqtt2d/jeedom/jeedom.js:17:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

et c’est un Raspberry Pi 3 Modèle B et non un 2

Tu toujours un soucis de nodejs qui reste en 10 c’est la le problème par contre je sais pas pk

À cause de la source sury.org qui pose probleme. Ça bloque la création du cache et donc le nouveau paquet nodejs.

et comment je peux résoudre ce problème de source ?
Je fais une montée un version de node.js via des lignes de commande ?

Non ça bloquera tout autant…

Il faut aller voir dans /etc/apt/sources.list ou dans un des fichiers dans /etc/apt/sources.list.d/ ou est cette source et la commenter (# au début de la ligne) temporairement au moins pour que le apt-get update puisse se faire et l’installation de Nodejs également !