Nodejs pm2 error on application startup

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

I installed nodejs and pm2 hoverwer when I try to start the pm2 web interface using pm2 web or run the nodejs application using pm2 start myapp.js it gives this error: /usr/bin/env: node: No such file or directory

Am I doing something wrong?

+6
source share
1 answer

The following command should be run in the console:

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

and try to start the node application again.

+19
source

Source: https://habr.com/ru/post/983842/


All Articles