Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log nodeJS version

Tags:

node.js

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?

like image 467
Jethro Larson Avatar asked Apr 03 '14 17:04

Jethro Larson


People also ask

How do I check Nodejs version?

To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type node -v . This should print the version number so you'll see something like this v0. 10.35 .

What is current version of Nodejs?

js v18 is the Current version! Node. js 18 will be the 'Current' release for the next 6 months and then promoted to Long-term Support (LTS) in October 2022.

How do I check if I have the latest version of node?

With the npm command, you can check running Node. js versions and install the latest release. By adding the n module, you can interactively manage Node. js versions.


1 Answers

console.log(process.version); 

Should do the trick.

like image 143
Chris Tavares Avatar answered Oct 18 '22 05:10

Chris Tavares