How to fix deploy meteor with pm2-meteor

My server installed node npm pm2

meteor@mahaserver:~$ node -v
v13.11.0
meteor@mahaserver:~$ npm -v
6.13.7
meteor@mahaserver:~$ pm2 -v
4.2.3
meteor@mahaserver:~$ command -v node
/home/meteor/.nvm/versions/node/v13.11.0/bin/node
meteor@mahaserver:~$ command -v npm
/home/meteor/.nvm/versions/node/v13.11.0/bin/npm
meteor@mahaserver:~$ command -v pm2
/home/meteor/.nvm/versions/node/v13.11.0/bin/pm2
meteor@mahaserver:~$ 

config

"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