Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node -bash: /usr/sbin/node: No such file or directory

Tags:

linux

node.js

I am having this error with node. Running Debian 7 (Wheezy) a VPS.

I have this error if I for example run this command (in the directory of the .js)

node sell.js

or

screen node sell.js

They both don't work, because I am getting this error:

-bash: /usr/sbin/node: No such file or directory

Can somebody help me?

like image 659
Justin van Dongen Avatar asked Dec 03 '22 14:12

Justin van Dongen


1 Answers

As in @Quentin's answer, the name of the executable may be incorrect. In many cases, what got installed was nodejs, not node. The line below creates a symbolic link that points to nodejs from where your system looks when you type node. It is a work-around - an alternative to simply typing nodejs

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

like image 79
Elmiya Agnes Avatar answered Jan 17 '23 17:01

Elmiya Agnes