hawkeye hawkeye - 1 year ago 84
Node.js Question

Node.js version on the command line? (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)

Answer Source

The command line for that is:

node -v


node --version


If node -v doesn't work, but nodejs -v does, then something's not set up quite right on your system. See this other question for ways to fix it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download