I have installed pm2 module using the following command:
npm install pm2@latest
Then I tried to start my test application using pm2 as follows:
$ pm2 start test.js
It throws the following error:
'pm2' is not recognized as an internal or external command
Do i need to set environment variable for pm2?
You need to install PM2 globally via npm install --global pm2@latest
and if you want to use the local version, try ./node_modules/.bin/pm2 start test.js
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With