Smart Cities - Node-RED re-installation or version upgrade
Jump to navigation
Jump to search
Background
- Node-RED may require an upgrade to a newer version.
- Scripts are available to help facilitate the upgrades on the Raspberry Pi [1]
Check Current Version of Node-RED and Node.js
- Open the Terminal and start Node-RED with the command node-red
- If Node-RED is installed the initial output in the Terminal will indicated installed versions of Node-RED and Node.js
- Node.js version should be either v16 or v18. This version is only 145 so we will need to do an upgrade.
Installing and Upgrading Node-RED
- The following script installs Node.js, npm and Node-RED onto a Raspberry Pi.
- The script can also be used to upgrade an existing install when a new release is available.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --help
- This script will:
- remove the existing version of Node-RED if present.
- if it detects Node.js is already installed, it will ensure it is at least v14.
- If less than v14 it will stop and let the user decide whether to stay with Node-RED version 1 - or upgrade Nodejs to a more recent LTS version.
- If it is a fresh install the script will install the Node.js 16 LTS release using the NodeSource package.
- The latest version of Node-RED will be installed using npm.
Online Resource
- Go to the URL https://nodered.org/docs/getting-started/raspberrypi
- You can search for this web page by entering the search node-RED upgrade Raspberry Pi
- This page explains how to perform the update.
- Enter the command bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --help
- Just copy and paste the command from the web page.
- Use the right mouse button on the mouse to copy and paste or use the drop down menus on the computer screen.
- Short cut commands may not work correctly for copy and paste.
- Make sure to add --help at the end. Note that there are two (-) minus symbols.
- This instruction will output some more information on how to upgrade to a newer version of Node-RED.
- We need to upgrade to version 14 or 16.
- Copy the same command as before and add --node14 or --node16 to the end of the statement. Note that there are two (-) minus symbols before the 14.
- Answer y (yes) to any questions.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node16
- The installation will take five minutes to complete.
- During the installation a progress table showing green ticks will appear.
- All items need a green tick.
- If there are any red crosses the installation has failed.
- Screen capture showing successful installation of Node-RED version 14.