Course contentsShow
← JavaScript
Lesson 1503 of 2,72333. JavaScript in Node.jsFree lesson

Process.version and Process.versions

Inspecting Node.js version and dependency versions like V8, OpenSSL, and zlib.

Process.version and Process.versions

You'll learn how to inspect the Node.js runtime version and its internal dependency versions programmatically.

What Are These Properties?

When you're running JavaScript in Node.js, you're actually running code on top of several underlying technologies: the Node.js runtime itself, the V8 JavaScript engine, OpenSSL for encryption, zlib for compression, and more. The process.version and process.versions properties let you peek under the hood to see exactly which versions of these technologies are currently powering your application.

Think of it like checking the "About" section of software—you can see not just the main version number, but all the component versions that make it work.

Process.version

This property returns a single string showing your Node.js version:

console.log(process.version);
// Output: 'v18.16.0' (or whatever version you're running)

The format follows semantic versioning: v<major>.<minor>.<patch>.

Process.versions

This property returns an object containing version strings for Node.js and all its key dependencies:

console.log(process.versions);
// Output example:
// {
//   node: '18.16.0',
//   v8: '10.2.154.26-node.26',
//   openssl: '3.0.8+quic',
//   zlib: '1.2.13',
//   ...many more
// }

You can access specific versions:

console.log('V8 version:', process.versions.v8);
console.log('OpenSSL version:', process.versions.openssl);

This is particularly useful for debugging compatibility issues, security audits, or feature detection based on minimum versions.

Key Takeaway: process.version shows your Node.js version as a string, while process.versions provides an object with version information for Node.js and all its internal dependencies like V8, OpenSSL, and zlib.