Reputation: 7737
This is really confusing me. If I type "node -v" into the command line, there is no response - it just gives me the $
prompt again. Trying to install node with sudo npm install nodejs
gives the response nodejs is already the newest version
.
How can I debug this to find out what's going on?
Upvotes: 0
Views: 1666
Reputation: 5
Node is by default installed on /usr/bin/ directory on linux OS it means it should run with normal user privilege but node include some tools that required Superuser privilege so ...
Instead running
node -v
run
sudo node -v
hope it will work...keep coding
Upvotes: 0
Reputation: 604
nodejs -v
solved the problem.
In some linux distributions node executable is mapped into nodejs
.
Upvotes: 4
Reputation: 307
Are you trying to print the node version? If yes then try
$ node --version
Upvotes: 0