How to fix deploy meteor with pm2-meteor

My server installed node npm pm2

meteor@mahaserver:~$ node -v
meteor@mahaserver:~$ npm -v
meteor@mahaserver:~$ pm2 -v
meteor@mahaserver:~$ command -v node
meteor@mahaserver:~$ command -v npm
meteor@mahaserver:~$ command -v pm2


"server": {
    "host": "x.x,x,x.",
    "username": "meteor",
    "pem": "~/.ssh/id_rsa",
    "deploymentDir": "/home/apps",
    "loadProfile": "",
    "interpreter": "",
    "exec_mode": "cluster_mode",
    "instances": 2

run pm2-meteor deploy

Building your app and deploying to host machine |
missing node
missing npm
missing pm2

ERROR: Please make sure you have node, npm and pm2 installed on your remote machine!

Thank you.

I’m not familiar with pm2-meteor, but using pm2 directly. This looks like the user under which it’s running the script is not the same under which Node, npm, and pm2 have been installed.

From what I see in your snippets, ensure that pm2-meteor executes under user meteor.

1 Like