I am installing PM2 for hubot rocket.chat adapter. so i did the following:
I firstly added a <pm2.json> file to hubot adapter folder, then
sudo npm install pm2 -g
cd <hubot directory>
pm2 start <pm2.json>
The i got error saying this:
No command 'pm2' found, did you mean: Command 'wm2' from package 'wm2' (universe) Command 'pms' from package 'pms' (universe) Command 'pmk' from package 'pmk' (universe) Command 'pmw' from package 'pmw' (universe) Command 'fpm2' from package 'fpm2' (universe) Command 'pom2' from package 'libpod-pom-perl' (universe) Command 'pmi' from package 'powermanagement-interface' (universe) Command 'pm' from package 'powerman' (universe) pm2: command not found
Then I tried to add the path by doing:
sudo env PATH=$PATH:/home/jy/.npm-global/bin pm2 startup -u safeuser
and restarted PuTTY,
still get the same error.
when I went to where PM2 is at, which is /home/jy/.npm-global/bin, and do
pm2 start <pm2.json> command, still get the same error.
Is there anything i did wrong? or there might be other reasons?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!