DEV Community

Discussion on: Run your Node.js application on a headless Raspberry Pi

Collapse
 
mbariola profile image
Massimiliano Bariola

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

Collapse
 
bogdaaamn profile image
Bogdan Covrig

Thanks for the heads up! Duly noted.