Node-red-start not working

Hello,

I was trying to make the node red work as a service on raspberry pi, so it starts on boot, and so, I don't have to use a monitor or an SSH each time I am using the raspberry pi (I use the raspberry pi's GPIO pins with node-red).
Every time I use the command node-red, it works perfectly fine and I can open the browser page. But, whenever I use the node-red-start or sudo systemctl enable nodered.service commands, I get the same error in the logs, that node-red-pi does not exit in /usr/bin/env:

Upon using the which command for both node-red and node-red-start commands, I found that they are not in the same place:
node-red-start:
node-red-start
node-red:
which node-red

I am not sure if this is the problem ..?
Also, I think I should mention that I downloaded and installed the node red at first from the zip folder, but then after facing this problem I reinstalled (but I can still see my flow) it with the bash script in the nodeRED documentation as I saw that it was advised to do so.
There was no problem with the script:

I hope you can help me with this please.
Thank you in advance!

Fatima

Your problem is revieled by a single letter! "n" as in /home/pi/n/....

n is a tool for managing multiple versions of node.js and your system is somewhat confused.

I recommend that you undo some steps. Remove n and any of its folders. Check that node.js is correctly installed as a system-wide installation. Check that Node-RED is globally installed.

Thank you very much! It's working now!

I removed the n folder as you have suggested and reinstalled the node-red with the bash script, and it works!
I can now run the node-red with the IP address as well :tada:

1 Like

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