javascript – How to tell if node.js is installed or not
javascript – How to tell if node.js is installed or not
Open a terminal window.
Type:
node -v
This will display your nodejs
version.
Navigate to where you saved your script and input:
node script.js
This will run your script.
open a terminal and enter
node -v
this will tell you the version of the nodejs installed, then run nodejs simple by entering
node
Prompt must be change. Enter following,
function testNode() {return Node is working}; testNode();
command line must prompt the following output if the installation was successful
Node is working
javascript – How to tell if node.js is installed or not
Please try this command node –version or node -v, either of which should return something like v4.4.5
.