Report this

What is the reason for this report?

PM2 status "errored"

Posted on October 16, 2020

Hi

I have 3 NodeJs projects deployed. Two are working fine and PM2 background process are running continuously.

But for one project it the status shows as “errored” within few minutes.

Droplet: Ubuntu 18.04.3 (LTS) x64

Please let me know how to fix this.

Regards Mohan



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.

It seems you have Yarn installed using npm, in which case /usr/local/bin/yarn will link to the node script yarn.js (as defined in its package.json) and not the bash script yarn. So bash yarn start (what you are essentially doing) won’t work.

Try this instead, without interpreter:

pm2 start yarn --name test – start

What do the logs say?

if you run “PM2 logs” should give you an idea of what may be happening.

pm2 error

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.