So, I'm working on a mac and as webserver, I got Debian 8 installed. However, I'm currently working on a node application which I developed on my localhost most of the time, where everything works fine - I can use node index.js
without issues.
However, I installed node on my webserver via the recommendation of the node.js website, which is ...
sudo apt-get install -y nodejs
... which didn't throw any errors. After that, I could use the npm command. But when I try to execute node index.js
, I receive bash: node: command not found
. Also, node is not installed in my /usr/local/bin
folder. So I can't even run in via /usr/local/bin/node
which was recommended here.
So what exactly did I do wrong? I'm rather confused right now and really don't know how to fix the problem.