Node-Red Install Script Not Completing

Hello,

I have installed Node-Red on dozens of machines (Raspberry Pi's and PC's) and have never had an issue with the official install script bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered), but today it is getting hung up at the very end when it usually asks me if I want to modify the settings.js file. I've waited for more than an hour twice and it never completes. I'm installing on a fresh install of RPI OS (Bullseye) on a Pi4B after running apt update and apt full-upgrade. Here is a screenshot of what it looks like:

Here are the steps I've tried:
Running the install script multiple times
Rebooting the Pi multiple times
Specifying --node18
Trying with or without install Pi-specific nodes

I've checked the nodered-install.log file and the only thing of interest I can see is a warning that "apt does not have a stable CLI". I don't believe there are any errors.

Thank you in advance.

Does sudo apt update && sudo apt full-upgrade work without errors?

If it does then post the install log please.

Yes it does complete without errors.

Here is the log file. I believe it shows multiple attempts.

OLD nodejs 0 :
NEW nodejs  :

***************************************

Started : Wed 27 Mar 2024 04:56:03 PM CDT
Running for user jci at /home/jci
Failed to stop nodered.service: Unit nodered.service not loaded.
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered:armhf' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing nodejs 18

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs-legacy' is not installed, so not removed
Package 'nodejs' is not installed, so not removed
Package 'npm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dpkg: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn't installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Grab the LTS bundle

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20210119).
curl is already the newest version (7.74.0-1.3+deb11u11).
gnupg is already the newest version (2.2.27-2+deb11u2).
gnupg set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Get:3 https://deb.nodesource.com/node_18.x nodistro InRelease [12.1 kB]
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
Get:5 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages [7,613 B]
Get:6 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages [7,603 B]
Hit:7 http://security.debian.org/debian-security bullseye-security InRelease
Hit:8 https://repos.influxdata.com/debian stable InRelease
Fetched 27.4 kB in 15s (1,850 B/s)
Reading package lists...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.9 MB of archives.
After this operation, 187 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x nodistro/main arm64 nodejs arm64 18.20.0-1nodesource1 [28.9 MB]
Fetched 28.9 MB in 20s (1,421 kB/s)
Selecting previously unselected package nodejs.

(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 ... 93168 files and directories currently installed.)

Preparing to unpack .../nodejs_18.20.0-1nodesource1_arm64.deb ...

Unpacking nodejs (18.20.0-1nodesource1) ...

Setting up nodejs (18.20.0-1nodesource1) ...

Processing triggers for man-db (2.9.4-2) ...


Versions: node:v18.20.0 npm:10.5.0
npm WARN using --force Recommended protections disabled.
Now install Node-RED 

added 305 packages in 43s
3.1.7
Now create basic package.json for the user and move any global nodes
Running npm rebuild

rebuilt dependencies successfully
Installing extra nodes: node-red-node-pi-gpio@latest node-red-node-random@latest node-red-node-ping@latest node-red-contrib-play-audio@latest node-red-node-smooth@latest node-red-node-serialport@latest node-red-contrib-buffer-parser@latest :

added 28 packages in 18s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for jci:jci @ /home/jci
ln: failed to create symbolic link '/usr/bin/python': File exists
Already have nodejs 18.20.0-1nodesource1
OLD nodejs 18 :
NEW nodejs  :

***************************************

Started : Thu 28 Mar 2024 08:31:44 AM CDT
Running for user jci at /home/jci
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered:armhf' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Versions: node:v18.20.0 npm:10.5.0
Now install Node-RED 

added 305 packages in 37s
3.1.7
Now create basic package.json for the user and move any global nodes
Installing extra nodes: node-red-node-pi-gpio@latest node-red-node-random@latest node-red-node-ping@latest node-red-contrib-play-audio@latest node-red-node-smooth@latest node-red-node-serialport@latest node-red-contrib-buffer-parser@latest :

up to date in 10s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for jci:jci @ /home/jci
ln: failed to create symbolic link '/usr/bin/python': File exists
Already have nodejs 18.20.0-1nodesource1
OLD nodejs 18 :
NEW nodejs 18 :

***************************************

Started : Thu 28 Mar 2024 08:46:11 AM CDT
Running for user jci at /home/jci
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered:armhf' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing nodejs 18

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'npm' is not installed, so not removed
The following packages will be REMOVED:
  nodejs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 187 MB disk space will be freed.
(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 ... 98562 files and directories currently installed.)

Removing nodejs (18.20.0-1nodesource1) ...

Processing triggers for man-db (2.9.4-2) ...

dpkg: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn't installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Grab the LTS bundle

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20210119).
curl is already the newest version (7.74.0-1.3+deb11u11).
gnupg is already the newest version (2.2.27-2+deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 https://deb.nodesource.com/node_18.x nodistro InRelease
Hit:3 https://repos.influxdata.com/debian stable InRelease
Hit:4 http://deb.debian.org/debian bullseye InRelease
Hit:5 http://deb.debian.org/debian bullseye-updates InRelease
Get:6 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Get:7 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [313 kB]
Get:8 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages [307 kB]
Fetched 644 kB in 13s (49.1 kB/s)
Reading package lists...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.9 MB of archives.
After this operation, 187 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x nodistro/main arm64 nodejs arm64 18.20.0-1nodesource1 [28.9 MB]
Fetched 28.9 MB in 32s (908 kB/s)
Selecting previously unselected package nodejs.

(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 ... 93168 files and directories currently installed.)

Preparing to unpack .../nodejs_18.20.0-1nodesource1_arm64.deb ...

Unpacking nodejs (18.20.0-1nodesource1) ...

Setting up nodejs (18.20.0-1nodesource1) ...

Processing triggers for man-db (2.9.4-2) ...


Versions: node:v18.20.0 npm:10.5.0
npm WARN using --force Recommended protections disabled.
Now install Node-RED 

added 305 packages in 47s
3.1.7
Now create basic package.json for the user and move any global nodes
Running npm rebuild

rebuilt dependencies successfully
Installing extra nodes: node-red-node-pi-gpio@latest node-red-node-random@latest node-red-node-ping@latest node-red-contrib-play-audio@latest node-red-node-smooth@latest node-red-node-serialport@latest node-red-contrib-buffer-parser@latest :

up to date in 21s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for jci:jci @ /home/jci
ln: failed to create symbolic link '/usr/bin/python': File exists
Already have nodejs 18.20.0-1nodesource1
OLD nodejs 18 :
NEW nodejs  :

***************************************

Started : Thu 28 Mar 2024 09:08:49 AM CDT
Running for user jci at /home/jci
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered:armhf' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Versions: node:v18.20.0 npm:10.5.0
Now install Node-RED 

added 305 packages in 32s
3.1.7
Now create basic package.json for the user and move any global nodes
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for jci:jci @ /home/jci
ln: failed to create symbolic link '/usr/bin/python': File exists

I don't know why it might hang there.

Does node red run?

No. There is no settings.js file either. I'm thinking at this point about just wiping the SD card and install the OS again. Perhaps something didn't go right.

What happens when you run node-red?
There may not be a won't be a settings file until it runs successfully the first time.

The first time I tried to run node-red-start nothing happened and it stayed hung up. I rebooted the Pi again and then ran it and it ran properly.

The settings.js file was created and it appears to be running normally. It's just strange that the script that runs right after the install that helps you create a user and password, enable Projects, etc. didn't run. Oh well, for now I'm going to proceed as if everything is working correctly.

Just for curiosity's sake I went ahead I wiped the SD card and installed the OS again. After an update and full-upgrade I tried installing node-red again. To the best of my knowledge (and memory) I did exactly the same thing I did yesterday. Yet this time it installed normally and continued with the prompt to set up user, password, etc. The only thing different I noticed is that in the screenshot above it tried to install node-red core "3.1.7" and this time it installed "3.1.8". Go figure.

That is because 3.1.8 was released a few hours ago.

If you have any further really strange things happening then I would suspect the SD card.

Yes I have learned the hard way to only use high quality reliable SD cards. So far everything is back to normal.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.