TLDR: NOTE: The bash script has been fixed and now works.
Just installed V3.0.0 on a Pi model 3B V1.2 and ran the 'diff' to compare the settngs.js files and get this:
Just FYI : Your settings.js file is different from the latest defaults.
You may wish to run
diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js /home/pi/.node-red/settings.js
to compare them and see what the latest options are.
**pi@testpi**:**~ $** diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js /home/pi/.node-red/settings.js
diff: /usr/lib/node_modules/node-red/settings.js: No such file or directory
looks like there is an install issue. When I try to start NR I get
pi@testpi:/ $ node-red-start
Node-RED is not yet fully installed. Please re-run the install script again manually.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
then retry node-red-start
pi@testpi:/ $
bin playing some more. I reinstalled v2.2.2 with sudo npm install -g --unsafe-perm node-red@2.2.2 and it installed fine, ran and. so I tried sudo npm install -g --unsafe-perm node-red' and it runs and /usr/lib/node_modules/node-redis populated: pi@testpi:/usr/lib/node_modules/node-red $ ls bin CHANGELOG.md lib LICENSE node_modules package.json README.md red.js settings.js
So I ran the same command with out the version and get this:
Running Node-RED install for user pi at /home/pi on raspbian
This can take 20-30 minutes on the slower Pi versions - please wait.
Stop Node-RED โ
Remove old version of Node-RED โ
Node option not specified : --node14, --node16, or --node18
Leave existing Node.js : v14.20.0 Npm 6.14.17
Clean npm cache -
Install Node-RED core โ 3.0.0
Move global nodes to local -
Leave existing nodes -
Install extra Pi nodes โ
Add shortcut commands โ
Update systemd script โ
Any errors will be logged to /var/log/nodered-install.log
All done.
You can now start Node-RED with the command node-red-start
or using the icon under Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880
Started : Thu 14 Jul 2022 06:21:49 AM EDT
Finished: Thu 14 Jul 2022 06:23:11 AM EDT
Just FYI : Your settings.js file is different from the latest defaults.
You may wish to run
diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js /home/pi/.node-red/settings.js
to compare them and see what the latest options are.
pi@testpi:/ $ node-red
-bash: node-red: command not found
@Steve-Mcl Here is the log, I reinstalled using the bash script and NR will not start
pi@testpi:~ $ cat /var/log/nodered-install.log
Already have nodejs v14.20.0
OLD nodejs 14 :
NEW nodejs :
***************************************
Started : Thu 14 Jul 2022 06:59:41 AM EDT
Running for user pi at /home/pi
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' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Versions: node:v14.20.0 npm:6.14.17
Now install Node-RED
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN node-red-contrib-mp4frag@0.1.0-beta.4 requires a peer of socket.io@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-contrib-ui-mp4frag@0.1.0-beta.3 requires a peer of node-red-dashboard@^2.26.1 but none is installed. You must install peer dependencies yourself.
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
+ node-red@3.0.0
updated 1 package in 15.789s
3.0.0
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 :
npm WARN expo-random@12.1.2 requires a peer of expo@* but none is installed. You must install peer dependencies yourself.
npm WARN node-red-contrib-ui-mp4frag@0.1.0-beta.3 requires a peer of node-red-dashboard@^2.26.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-securerandom@0.1.1 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.
+ node-red-node-random@0.4.0
+ node-red-node-ping@0.3.1
+ node-red-contrib-play-audio@2.5.0
+ node-red-node-smooth@0.1.2
+ node-red-node-serialport@1.0.1
+ node-red-node-pi-gpio@2.0.4
updated 6 packages in 28.993s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for pi:pi @ /home/pi
ln: failed to create symbolic link '/usr/bin/python': File exists
Now add launcher to top bar, add cpu temp example, make sure ping works
The user `pi' is already a member of `gpio'.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-rpi.gpio is already the newest version (0.7.0-0.1~bpo10+4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Memory : 971M
Started : Thu 14 Jul 2022 06:59:41 AM EDT
Finished: Thu 14 Jul 2022 07:01:00 AM EDT
pi@testpi:~ $
The bash script is now working again!!
This pi was using node.js v14.20.0 and I ran the script with no extra options.
The 'diff' works and Node-red starts:
pi@testpi:~ $ node-red
14 Jul 08:34:39 - [info]
Welcome to Node-RED
===================
14 Jul 08:34:39 - [info] Node-RED version: v3.0.0
14 Jul 08:34:39 - [info] Node.js version: v14.20.0
14 Jul 08:34:39 - [info] Linux 5.10.63-v7+ arm LE
14 Jul 08:34:40 - [info] Loading palette nodes
14 Jul 08:34:49 - [info] Worldmap version 2.26.1
14 Jul 08:34:49 - [info] Dashboard version 3.1.6 started at /ui
14 Jul 08:34:51 - [info] Settings file : /home/pi/.node-red/settings.js
14 Jul 08:34:51 - [info] Context store : 'default' [module=memory]
14 Jul 08:34:51 - [info] User directory : /home/pi/.node-red
14 Jul 08:34:51 - [info] Projects directory: /home/pi/.node-red/projects
14 Jul 08:34:51 - [info] Server now running at http://127.0.0.1:1880/
14 Jul 08:34:51 - [info] Active project : 00-bret-sensehat
14 Jul 08:34:51 - [info] Flows file : /home/pi/.node-red/projects/00-bret-sensehat/flow.json
14 Jul 08:34:51 - [warn] Using unencrypted credentials
14 Jul 08:34:51 - [info] Starting flows