I'm using pm2 to keep tracking of what I do on backend with NodeJS. Until yesterday it all worked perfectly fine, but today, even if pm2 server is working fine (i can start the project server and i can navigate), pm2 logs just stopped for no reasons.
Here you can see the version I'm using (i already updated PM2 both on project and local as i find in other answers).
I usually use the command
pm2 start process.json
pm2 restart 0 --watch
pm2 restart 0
And in other prompt instance, for the logs i use
pm2 logs
For some reason PM2 is just tailgating the last 15 lines but it doesn't work real time like it used to do
I didn't find this exact problem on other questions (only questions about pm2 not working at all, but not about pm2 working half way). Any suggestions?
Apparently the version of node and pm2 were the source of the problem. I used this command to run pm2 using the node version explicitly
pm2 start process.json --interpreter=/home/ken/.nvm/v10.15.1/bin/node
This way you force pm2 to use settings for the version of node you've installed in your machine. Now both server and logs works fine.