Install Node-Red

Hi
I'm trying to install Node-Red on a RPi 2 B V1.1 / OS 32.bit Debian Bookworm

nodejs is v22.6.0
npm is 10.8.2

by install nodered - I get the message:

  • some packages could not be installed
  • ... request an impossible situation or using the unstable distribution ...
  • the following information may help ==> empty
  • the following package have unmet dependencies ==> nodered. npm (>=7)
  • E: unable to correct problems, held brocken packages

when executing:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

then I get the ERROR message /dev/fd/63 no such file or directory

when executing:
sudo apt install build-essential git curl

  • build-essential, already newest version (12.9)
  • git, already the newest version (1:2.39.2-1.1)
  • curl, already the newest version (7.88.1....)

I don't know what to do anymore (I had already installed Node Red on 3 devices without any problems)

thanks for any advices

Why do you have nodejs v22? Did you install that seperately?

Do these commands show any errors?

sudo apt update
sudo apt full-upgrade

Don't do the full-upgrade command if the update command shows errors.

no update and upgrade was ok

yes I install nodejs separately, I followed the instructions on the NR-doc page installing n-r

The docs for installing on a pi do not say to install nodejs separately. V22 is not yet supported (Supported Node versions : Node-RED). I suggest uninstalling nodejs and then run the script again.

If you still get the error post the install log here (/var/log/nodered-install.log).

ok I understand

in the doc it is mentioned that npm must be present beforehand

so I was not sure, how to get npm

now I have removed nodejs v22

Where does it say that?

As a test, I have just installed Node-red on a Pi 3B with a fresh RPiOS Lite 64 bit sd card.

ALL that I did on first logging in to the Pi was this, accepting all the default responses.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

After that npm -v && node-red --version gave me

10.8.1
Node-RED v4.0.2
Node.js v20.16.0
Linux 6.6.31+rpt-rpi-v8 arm64 LE

And Node-red runs successfully.
npm was not already installed as part of the OS, it was installed by the script.
I did not have to install build-essential, git or curl (perhaps git is required if you enable projects)

Note that it would have made sense to run sudo apt update and sudo apt -y full-upgrade first, but not strictly necessary.

hi

thank you for your post

I have done exactly the same, only with RPiOS desktop 32 bit sd card

and with this script I get the error message "/def/fd/63 no such file or...

thats all, then afterward I was trying...

That doesn't say that you have to install npm, it says that if you don't install build-essential, git and curl then when you run the script (which installs npm) then it will fail.

After you run the script what is in the install log?

Post the full message please.

There have been other reports of the same issue, but I thought only on older Pies with a 32 bit processor. The problem may be with the 32 bis OS rather than the hardware.

Can you try again with 64 bit RPiOS?

I have tried this twice now, it seems that the RPi does not support 64-bit (hanging by the first 4-colored screen / it's a older RPi 2 B V1.1)

Did you run the basic script or add anything on the end?

Sorry, you are right. I thought you said RPi 3.

I think the best you can expect on a 32 bit Pi is Node-red 3.1.9, which you can install with:

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --nodered-version="3.1.9"

But that is not a viable option long-term.
If you don't mind running Node-red on RPiOS Lite (ie accessing it with a browser on a PC) then you might find a Pi Zero 2 W works well, otherwise get a Pi 4. (Other small computers may be better value than a Pi 4 or 5)

first of all the basic script only
afterward with --help
the same result every time

That does not support the 64-bit version. You can checkout versions that are supported here
https://www.raspberrypi.com/software/operating-systems/

thank you, I will try them

it is not a RPi 3 / its a RPi 2 B