Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the node.js version at runtime

I'm having some compatibility issues with old versions of node.js.

Is there any way to get the node.js version at runtime?

like image 436
Peter Avatar asked Jan 28 '12 09:01

Peter


People also ask

How do I check my 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 the node JS runtime?

Node. js is a JavaScript runtime environment that achieves low latency and high throughput by taking a “non-blocking” approach to serving requests. In other words, Node. js wastes no time or resources on waiting for I/O requests to return.

What is Node JS current version?

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. Node.

How do I get npm version?

To check the version of globally installed npm packages, run the npm list command with the -g or --global option added.


1 Answers

> process.version
'v0.6.8'
> process.versions
{ node: '0.6.8',
  v8: '3.6.6.19',
  ares: '1.7.5-DEV',
  uv: '0.6',
  openssl: '0.9.8g' }
like image 105
Dan D. Avatar answered Oct 09 '22 01:10

Dan D.