Jethro Larson
Jethro Larson

Reputation: 2335

Log nodeJS version

I know I can check the node version in my path with

node -v

But I have a system that's not run from that path and I want to check which node version it's using. Something like console.log(node.version) would be ideal

Anyone know how to do that?

Upvotes: 31

Views: 14882

Answers (1)

Chris Tavares
Chris Tavares

Reputation: 30391

console.log(process.version);

Should do the trick.

Upvotes: 76

Related Questions