process.version

The Node.js version string, and process.versions for component versions.

Since Node 0.x Spec ↗

Syntax

process.version  /  process.versions

Returns

string | object — version is like 'v22.1.0'; versions maps node, v8, uv, etc.

Examples

console.log(process.version);
Output
v22.1.0
console.log(process.versions.v8);
const major = Number(process.version.slice(1).split('.')[0]);
console.log(major >= 18);
Output
12.4.254.21
true

Notes

`process.version` includes the leading `v`; strip it before numeric comparison. `process.versions` exposes the bundled V8, libuv, OpenSSL and other component versions, useful in diagnostics.

See also