pm2 start /usr/bin/node-red --node-args="--userDir /home/pi/.node-red/"
which responds with an error of "node: bad option: --userDir" in the error log. So it looks like the node-args isn't handling the space between userDir and the path
I then tried:
pm2 start /usr/bin/node-red --node-args=" '--userDir /home/pi/.node-red/' "
which in turn responds with an error of "node: bad option: --userDir /home/pi/.node-red/"
If I try this without pm2 it works just fine. i.e. /usr/bin/node-red --userDir /home/pi/.node-red/
I'm stuck?