My computer is running Ubuntu 14.04.4 LTS. I was trying to get a simple hello world file to work with node, but was unable to. I ran the command node hello.js
and nothing happened. I ran apt-get remove nodejs
and then apt-get install nodejs
and finally apt-get install npm
This seemed to work, however when I run node -v
nothing happens. No error, just nothing. which node
ouptuts /usr/sbin/node
What can I do to attempt to solve this issue?
Add a comment
|
2 Answers
Default nodejs that comes with Ubuntu can be executed the following way:
nodejs -v
If you upgrade to the latest using https://github.com/nodesource/distributions, you will be able to execute it with
node -v
Try downloading nodejs and install it
http://www.tutorialspoint.com/nodejs/nodejs_environment_setup.htm