Installing Node-RED alongside Homebridge (pre-built image)

Hello:

I'm trying to install Node-RED on a RPi5 alongside the prebuilt Homebridge image. Has anyone installed this successfully? If so, any pointers/guidance would be really appreciated.

When I install using the RPi script, it shows that Node-RED core was not installed

However, when I run "which node-red" I see that it is installed

pi@homebridge:/var/lib/homebridge $ which node-red
/opt/homebridge/bin/node-red

and I can manually run node-red from that directory.

pi@homebridge:/var/lib/homebridge $ node-red
28 Jul 16:07:23 - [info] 

Welcome to Node-RED
===================

28 Jul 16:07:23 - [info] Node-RED version: v4.0.9
28 Jul 16:07:23 - [info] Node.js  version: v22.17.1
28 Jul 16:07:23 - [info] Linux 6.12.34+rpt-rpi-2712 arm64 LE
28 Jul 16:07:23 - [info] Loading palette nodes
28 Jul 16:07:24 - [info] Settings file  : /home/pi/.node-red/settings.js
28 Jul 16:07:24 - [info] Context store  : 'default' [module=memory]
28 Jul 16:07:24 - [info] User directory : /home/pi/.node-red
28 Jul 16:07:24 - [warn] Projects disabled : editorTheme.projects.enabled=false
28 Jul 16:07:24 - [info] Flows file     : /home/pi/.node-red/flows.json
28 Jul 16:07:24 - [info] Creating new flow file
28 Jul 16:07:24 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

28 Jul 16:07:24 - [warn] Encrypted credentials not found
28 Jul 16:07:24 - [info] Server now running at http://127.0.0.1:1880/
28 Jul 16:07:24 - [info] Starting flows
28 Jul 16:07:24 - [info] Started flows

But when I try and run it as a service using node-red-start, it errors out with the following output

pi@homebridge:/var/lib/homebridge $ node-red-start

Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.1.170:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
nodered.service: Failed with result 'exit-code'.
node-red-start
nodered.service: Scheduled restart job, restart counter is at 51.
Stopped nodered.service - Node-RED graphical event wiring tool.
Started nodered.service - Node-RED graphical event wiring tool.
/usr/bin/env: ‘node-red-pi’: No such file or directory
nodered.service: Main process exited, code=exited, status=127/n/a
nodered.service: Failed with result 'exit-code'.
^Cpi@homebridge:/var/lib/homebridge $ 

I have also tried to install using NPM ( sudo npm install -g --unsafe-perm node-red) but that ends with sudo: npm: command not found

Thanks for your help.