Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH pm2: command not found

Tags:

ssh

pm2

When I run this command from my local machine...

ssh [email protected] "pm2 reload all"

I get this error...

pm2: command not found

Running the command in the remote machine works fine, so it's not a pathing issue?

like image 455
Ivan Avatar asked Jun 01 '26 15:06

Ivan


1 Answers

you need to run the nvm to get it going first

ssh [email protected] "source ~/.nvm/nvm.sh && pm2 reload all"

like image 107
Moe Singh Avatar answered Jun 03 '26 06:06

Moe Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!