Hi,
I just want to update NodeRED to 4.0.5 from 3.0.2, so I launch the script on the official site but something was wrong.
The script has updated Node from 16.x to 18.14.1 but hasn't update NodeRED and also now I can't run node-red-start because NodeRED try to start using node v12.22.12 and I don't know how to fix it!
Yes, if you have them installed, and also you may need to delete local folders that they use. Work out what you have installed and then google for how to completely remove it.
Perhaps you have volta or fnm or asdf node version manager instead?
The reason I suspect you have a node version manager is your installation says Nord 18 was installed, but when you run node-red it reports version 12. This is very typical of a node version manager.
So, I'm not an expert of Linux OS so basically I don't know how to uninstall those softwares, if there is some correct procedure can you suggest a guide/tutorial/article for doing it in the correct way?
At some stage you have used nvm. Delete the .nvm folder and try those commands again. [Edit] Then run the node red upgrade script again to correctly install a later version of nodejs.
Hi Colin,
Node-RED is sucesfully installed, but it isn't able to start yet:
It looks like serialport didn't install properly.
More information can be found here https://serialport.io/docs/guide-installation
The result of requiring the package is: undefined
Error: Could not locate the bindings file. Tried:
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/compiled/20.18.1/linux/arm/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v115-linux-arm/bindings.node
at bindings (/home/pi/.node-red/node_modules/@serialport/bindings/node_modules/bindings/bindings.js:126:9)
at Object.<anonymous> (/home/pi/.node-red/node_modules/@serialport/bindings/lib/linux.js:2:36)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/pi/.node-red/node_modules/@serialport/bindings/lib/index.js:14:22)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/pi/.node-red/node_modules/serialport/lib/index.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/pi/.node-red/node_modules/firmata/lib/com.js:44:18)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/pi/.node-red/node_modules/firmata/lib/firmata.js:3:40)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at module.exports (/home/pi/.node-red/node_modules/node-red-node-arduino/35-arduino.js:5:17)
at loadNodeSet (/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:359:27)
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:453:31
at Array.forEach (<anonymous>)
at loadNodeSetList (/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:448:11)
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js:145:16 {
tries: [
'/home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/compiled/20.18.1/linux/arm/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node',
'/home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v115-linux-arm/bindings.node'
]
}
17 Dec 11:09:51 - [warn] ------------------------------------------------------
17 Dec 11:09:51 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency
17 Dec 11:09:51 - [warn] [node-red-node-pi-sense-hat/sensehat] Error: Can't find Sense HAT python libraries. Run sudo apt-get install sense-hat
17 Dec 11:09:51 - [warn] [node-red-contrib-gpio/gpio] Error: Could not locate the bindings file. Tried:
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/Debug/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/out/Debug/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/Debug/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/out/Release/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/Release/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/build/default/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/compiled/20.18.1/linux/arm/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
โ /home/pi/.node-red/node_modules/@serialport/bindings/lib/binding/node-v115-linux-arm/bindings.node
17 Dec 11:09:51 - [warn] ------------------------------------------------------
17 Dec 11:09:51 - [info] Settings file : /home/pi/.node-red/settings.js
17 Dec 11:09:51 - [info] Context store : 'default' [module=memory]
17 Dec 11:09:51 - [info] User directory : /home/pi/.node-red
17 Dec 11:09:51 - [info] Projects directory: /home/pi/.node-red/projects
17 Dec 11:09:51 - [warn] httpsRefreshInterval requires https property to be a function
17 Dec 11:09:51 - [red] Uncaught Exception:
17 Dec 11:09:51 - [error] Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
at Server.setupListenHandle [as _listen2] (node:net:1908:16)
at listenInCluster (node:net:1965:12)
at doListen (node:net:2139:7)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Consumed 9.799s CPU time.
[hint]:
is possible that is the MariaDB configuration that can have conflicts on it?
edit:
The UI dashboard is up and running, but the node-red console isn't able to load on the browser!
That means that probably node red was already running when you started it again. Stop node-red using node-red-stop
then start it again using node-red-start
If you still have problems then post the full output from node-red-start
So after running node-red-stop you still see the EADDRINUSE error? If so then run node-red-stop again then post the result of ps -aux |grep -i node
and top
If you are not seeing the EADDRINUSE error then please do as I asked and post the output from node-red-start after running node-red-stop.
If you do sudo systemctl disable nodered * and reboot, what does ps -ef | grep node-red | grep -v grep show you?
Assuming it returns nothing, does node-red-start work?
* to make node-red start automatically [again] you would eventually need to run sudo systemctl enable nodered
Basically I think that the "node-red" service was activated by my call to node-red --version, so for now all it's ok... mabye when I have a moment (My nodered is going to menage many thinks so I can't just turn it off when I want) I can try to reboot RPI and see if all it's ok!
As you can see from the top output, node-red is hogging the processor, so something is wrong. The way to get round that is to do what @jbudd suggested, disabling the node red start on boot, then boot and run node-red --safe
which will start the node-red editor without starting the flows. Then you can edit the flows (disabling tabs may be a good start to find where the loop is) and the flows will start when you deploy. You can check in top to see if it is ok, and if it is still hogging the processsor then reboot again and make some more edits.