I install pm2 as instructed, but when I try to pm2 start app.js I get a pm2: command not found error. I see no errors during pm2 installation. I had to add
export PATH=$PATH:/opt/nodejs/lib/node_modules/pm2/bin
to my .bashrc
then source .bashrc
to make it work on npm 6.7.0 / 6.9.0, latest version of raspbian
I install pm2 as instructed, but when I try to pm2 start app.js I get a pm2: command not found error. I see no errors during pm2 installation. I had to add
export PATH=$PATH:/opt/nodejs/lib/node_modules/pm2/bin
to my .bashrc
then source .bashrc
to make it work on npm 6.7.0 / 6.9.0, latest version of raspbian
Thanks for the heads up! Duly noted.