I just installed node.js. I tried writing node -v that should check the version - and it\'s not working. this is the output:
> node -v ReferenceError: node
Thanks for this help.
If you are using windows, like me, and want a desktop shortcut and you already have the nice node.js desktop icon, edit the shortcut properties like this:
now you have a command prompt, with the node.js icon, that opens in the folder you expect, that responds correctly to the node -v command.
First time using node.js
Although already answered, but just putting in my 2-cents,
Normally, the first time users would trip over it, so am posting some screen shots, and that OP wants to try node -v
, so making it a bit easier to follow.
Hope it helps someone.!
Follow below Steps:
It looks like you have entered the node REPL and then typed node -v
The good news is that this means node is working!
To check the version from here you can type process.version
to get the node version. Alternatively type process.exit()
to exit the node REPL and get back to bash (or equivalent terminal).
From here node -v
should just output the node version.
Instead of node.exe, try to run node from "Node.js command prompt".
First, you should install nodejs.msi from nodejs.org.
Once installation is completed, go to: Start > All Programs > Node.js > Node.js command prompt.
It worked for me.
Try opening up a new terminal (Run -> CMD) and then executing:
node /your_file_name.js
And to see which version you have installed, just execute:
node -v