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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.