Reinstalling node red flows and dependencies manually

I found a messed up my system badly the other day after breaking it. I tried to do a manual install copying the files in from elsewhere and the permissions were all wrong.

I found that also node red would start and say all the packages needed installing and then fail to install them.

To make it easy you need to use the user nodered. This is not set up to use the bash by default.

Stop node-red from remote

sudo usermod -s /bin/bash nodered
su - nodered
whoami       <--- check you are indeed the nodered user
cd /data/home/nodered/.nodered
npm install     <---- safe to do now you are nodered user

start node-red from remote