Languages
[Edit]
EN

Node.js - get version programmatically (at runtime)

7 points
Created by:
JoanneSenior
1070

In this article, we would like to show how to get Node.js version programmatically.

Quick solution:

const version = process.version;

 

Practical example

Example index.js file:

console.log(process.version);

Example output:

v16.13.0

 

See also

  1. Node.js - check version using command prompt

Alternative titles

  1. Node.js - check version programmatically (at runtime)
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join