On a side note I sometimes see odd things on the forum. Andrew's post showing the apt-cache results only just appeared, long after later messages. It has put it in the right place chronologically but it did not appear immediately. This has caused me confusion several times.
You should never use -g unless you know that you need it.
That will generally only be if you need a system-wide command from the installed package. With Node-RED, installing with -g gives you a global node-red command for example. You can also install Node-RED locally but that is a different discussion.
With Node-RED, local installations of supporting packages (that provide nodes) should always happen in the userDir folder. This is normally /home/pi/.node-red AKA ~/.node-red.