Adr
Adr

Reputation: 424

nodejs pm2 error on app startup

I am trying to run a nodejs application I built on my windows machine unto my Ubuntu Server 14.04.

I have installed nodejs and pm2 hovewer when I try to start the pm2's web interface using pm2 web or start my nodejs app using pm2 start myapp.js, it throws this error: /usr/bin/env: node: No such file or directory

Am I doing something wrong?

Upvotes: 6

Views: 8352

Answers (1)

Raugaral
Raugaral

Reputation: 1323

You must run following command in console:

sudo ln -s /usr/bin/nodejs /usr/local/bin/node

and try again to run the node app.

Upvotes: 21

Related Questions