Start node red without loading any flows

Hi Colin, it's running from an SSD not a micro SD card. I have a backup from last year so I'm gonna give that a go and upgrade to latest versions...

In that case try running the bash <(curl... script from the node red docs for running on a Pi, and add on the end --node20 to force it to upgrade and hence reinstall nodejs and npm

Here we go again...started the bash script and get this:

Stop Node-RED :heavy_check_mark:
Remove old version of Node-RED :heavy_check_mark:
Using NVM to manage Node.js + please run nvm use lts before running Node-RED
NOTE: Using nvm is NOT RECOMMENDED. Node-RED will not run as a service under nvm.
Please see nvm --help or GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions for more information.
Update Node.js 20 ✘ Bad install: Node.js missing Npm missing - Exit
Move global nodes to local
Npm rebuild existing nodes

So I try:

pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $ nvm use lts
N/A: version "lts -> N/A" is not yet installed.

You need to run "nvm install lts" to install it before using it.
pi@raspberrypi:~ $ nvm install lts
Version 'lts' not found - try nvm ls-remote to browse available versions.
pi@raspberrypi:~ $ nvm install 20.12.2
v20.12.2 is already installed.
Now using node v20.12.2 (npm v)
pi@raspberrypi:~ $

I run the bash script again and get the same error as before..so I am going around in circles!!!

pi@raspberrypi:~ $ npm -v
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node) pi@raspberrypi:~ $ node -v node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node)
pi@raspberrypi:~ $

Remove nvm completely, run the install script again.

Hi, thanks for the help, sorry to sound like a dork but how do i remove NVM cleanly ??
Kind regards...

Opposite to how you installed it :wink:

Getting further but stuck at Node.js missing...I thought that this bash script installed it??

Stop Node-RED :heavy_check_mark:
Remove old version of Node-RED :heavy_check_mark:
Remove old version of Node.js :heavy_check_mark:
Install Node 20.12.2-1nodesource1 ✘ Bad install: Node.js missing Npm missing - Exit
Clean npm cache
Install Node-RED core
Move global nodes to local
Npm rebuild existing nodes
Install extra Pi nodes
Add shortcut commands
Update systemd script

Covered many times on the forum: Search results for 'Bad install: Node.js missing order:latest' - Node-RED Forum

Try the advice here: MQTT No Longer Works - #16 by jbudd then run the script again.

Looking at the 'mqtt no longer works' I tried:

pi@raspberrypi:~ $ sudo apt update && sudo apt list --upgradeable
Hit:1 Index of /debian buster InRelease
Hit:2 Index of /raspbian buster InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Listing... Done
pi@raspberrypi:~ $

So I am at my wits end with trying to ge this upgraded, every corner I turn there appears another problem!!!

What do these commands show
which node
node -v
I suspect something from nvm is hanging about.

pi@raspberrypi:~ $ node -v
-bash: /home/pi/.nvm/versions/node/v20.12.2/bin/node: No such file or directory
pi@raspberrypi:~ $

I suspect that "all packages are up to date" because Buster is no longer actively supported. Indeed it's only in Long Term Support until June 2024.

I too have Node-red on a computer running Buster. It is long past due for a rebuild from the ground up.

I suggest you:

  • Get a micro SD card (64GB seem to be at the sweet price point but 16GB should be plenty unless you have lots of data stored on the SSD) and install Bookworm.
  • Boot the Pi from the SD card but with your SSD still attached. (If you have the desktop OS, the SSD should automount, for Lite you need to research how to mount it)
  • Install Node-red and any other services.
  • Copy documents, scripts etc from SSD to SD
  • For Node-red, copy flows.json and flows_cred.json from SSD to SD
  • cd ~/.node-red; npm install. Any errors?
  • When the Pi is performing all of the functions that it currently does on SSD, use the copious notes you took during the above steps to repeat the process and get Bookworm onto the SSD.

Sounds simple? So how come my main Node-red server is still on an OS deprecated 3 years ago? :thinking:

The install script works fine on Buster, at least it does for me.

see the nvm part in that line :point_up_2:?

You have not cleanly removed NVM.

As Steve notes, you have not fully removed nvm. Delete that folder (/home/pi/.nvm) and re-run the script.

Running Node-RED install for user pi at /home/pi on raspbian
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node) node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node)
This can take 20-30 minutes on the slower Pi versions - please wait.
Stop Node-RED :heavy_check_mark:
Remove old version of Node-RED :heavy_check_mark:
Remove old version of Node.js :heavy_check_mark: 20.12.2-1nodesource1
Install Node 20.12.2-1nodesource1 ✘ Bad install: Node.js missing Npm missing - Exit cache
Install Node-RED core
Move global nodes to local
Npm rebuild existing nodes
Install extra Pi nodes
Add shortcut commands
Update systemd script
Any errors will be logged to /var/log/nodered-install.log
pi@raspberrypi:~ $

I also get this:

pi@raspberrypi:~ $ node -v
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node) pi@raspberrypi:~ $ npm -v node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by node)
pi@raspberrypi:~ $

Im pulling my hair out here !!!

What about
which node
and
apt policy nodejs

Also
cat /sys/firmware/devicetree/base/model

Im giving up and installing a fresh copy on virgin Bullseye image using the bash script...but guess what, more errors:


Is there an alternative to node red as Im getting very dispondant with it!

Other people do successfully install Node-red on a fresh RPiOS installation @Thewaver.
I have done it 3 times in the last 24 hours. The process really does work.
If you are consistently getting problems then you are perhaps doing something wrong.

Here are the essential steps:
Burn the SD card with Raspberry Pi Imager. Use the latest version (Bookworm, not Bullseye). Desktop or Lite both work.
Boot the Pi.
sudo apt update && sudo apt -y full-upgrade
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
At the end of the installation create a username and password, accept all the defaults.

Is there an alternative?
Some people like Home Assistant, which (I think) is a replacement operating system and IOT programming environment combined.