6

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?

Adr
  • 424
  • 4
  • 12
  • Is nodejs installed? I'd recommend the use of [nvm](https://github.com/creationix/nvm). – soyuka Mar 17 '15 at 08:20
  • duplicate of a question asked later in time: http://stackoverflow.com/questions/30281057/node-forever-usr-bin-env-node-no-such-file-or-directory – steampowered Aug 27 '16 at 14:58

1 Answers1

21

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.

Cyclops
  • 649
  • 3
  • 8
  • 33
Raugaral
  • 1,303
  • 13
  • 25