Question

PM2 status "errored"

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

Subscribe
Share

Submit an 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.