I want to get the version of node.js on the command line - I'm expecting to run a command like:
node -version
but that doesn't work. Does anybody know what the command line would be? (ie not the REPL)
I want to get the version of node.js on the command line - I'm expecting to run a command like:
node -version
but that doesn't work. Does anybody know what the command line would be? (ie not the REPL)
One cool tip if you are using the Atom editor.
It will return you not only the node version but also few other things.
Try
nodejs
instead of justnode
If you're referring to the shell command line, either of the following will work:
Just typing
node version
will cause node.js to attempt loading a module named version, which doesn't exist unless you like working with confusing module names.Node:
node --version
ornode -v
npm:
npm --version
ornpm -v
V8 engine version:
You can check if you have Node and Npm installed by typing:
$node --version && npm --version