Reputation: 2210
I am getting following error after typing $ node - version in My Linux Machine:
Error: unrecognized flag -
Try --help for options
module.js:340
throw err;
^
Error: Cannot find module '/home/ojas/version'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
I have used following Commands while Installing:
$ sudo apt-get install python-software-properties
$ curl -sL https://deb.nodesource.com/setup | sudo bash -
$ sudo apt-get update
$ sudo apt-get install nodejs
Upvotes: 0
Views: 123
Reputation: 24998
Two things to point out:
- The executable is called nodejs
and not node
, in Ubuntu.
- The flag is --version
~$ nodejs --version
v0.10.25
Upvotes: 2