I’m doing web automation by using Puppeteer with NodeJS. It works fine when I’m logged in to the terminal. I’m using ec2 instance Ubuntu 22 server.
But when I’m exit out of the terminal and then try to perform the task it just loads and loads and do nothing. But when I log in to check the pm2 logs then it starts working again with the terminal open.
When I check pm2 logs I get this error every time.
2
Answers
I suppose there is problem with the command you are trying to run the app. Use the following command to run the app via pm2.
For Cpanel Users having this issue
Login to your WHM account, click on the terminal, cd into the directory where your node js application is, then pm2 start .This was how i solved my issue.