What is the `PM2` for command `yarn run start`?
my pm2 version is 5.2.0
pm2 start "yarn start" --name yourProjec
For me (on ubuntu 20)
pm2 start yarn --name api -- start
would do the trick. With the bash interpreter flag it would error in pm2.
The error you're getting is because a bash script (yarn) is being executed with node...
Because pm2's default interpreter is set to node.
To run yarn you'll have to set the interpreter to bash:
shell:
Try the command below:
pm2 start yarn --interpreter bash --name api -- start