======== Mise à jour Node-red ========
{{ :start:rasberry:nodered:capture_d_ecran_du_2025-10-07_16-14-33.png?direct&600 |}}
[[https://nodejs.org/fr/download| MAJ Node red ]]
## au 07/10/2025
# Télécharger et installer nvm :
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# au lieu de redémarrer le shell
\. "$HOME/.nvm/nvm.sh"
# Télécharger et installer Node.js :
nvm install 22
# Vérifiez la version de Node.js :
node -v # Doit afficher "v22.20.0".
# Vérifier la version de npm :
npm -v # Doit afficher "10.9.3".
=== Mise à jour de node ( Idem installation voir MAJ raspberry ) ===
sudo apt update
sudo apt upgrade
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
{{ :start:rasberry:nodered:capture_d_ecran_du_2025-01-28_11-41-09.png?direct&800 |}}
Validez avec la touche entrée et répondez « yes » avec « y » à toutes les questions :
=== mettre à jour Node.js sur Raspberry Pi via Node Version Manager ===
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
On installe la derniere version stable de node-red
sudo npm install -g n
sudo nvm install stable
On reboot le raspberry
sudo shutdown -r now
On verifie la version
node -v
si l'on obtient :
V22.4.0 ( au 22/07/2024) c'est bon
sinon essayer ceci :
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install nodejs -y
node -v ( On devrait avoir la version 20.11.0 )
Sinon .... A suivre ....
Faire un reboot
sudo shutdown -r now
Il faut verifier les instances de node-red
192.168.XXX.XXX:188X
La version de Node-red devrait etre en Français ...
====== Methode pour la mise à jour de node.js ======
[[https://nodejs.org/fr/download/package-manager|MAJ de node.js]]
# layouts.download.codeBox.installsNvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# layouts.download.codeBox.downloadAndInstallNodejsRestartTerminal
nvm install 20 # indiquer le n° de version ( 2 Chiffres )
# layouts.download.codeBox.verifiesRightNodejsVersion
node -v # layouts.download.codeBox.shouldPrint
# layouts.download.codeBox.verifiesRightNpmVersion
npm -v # layouts.download.codeBox.shouldPrint