Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Node.js · Pipe

process.version

process.version is a string containing the version of the running Node.js runtime. It includes a leading v; use process.versions.node for the version without that prefix.

Since
v0.1.3

How it works

process.version is a read-only string containing the version of the Node.js runtime executing the program. It includes a leading v; use process.versions.node when that prefix is not wanted.

Syntax

process.version

Returns

A string containing the Node.js version, with a prepended v.

Key points

  • It exposes the version string of the Node.js runtime currently executing the code.
  • ES modules can read the value through the named version export from node:process.
  • CommonJS can obtain the same value by destructuring version from node:process.
  • Node.js has documented this property since version v0.1.3.

Common mistakes

  • Do not remove the leading v manually when you need an unprefixed version; use process.versions.node instead.

Example: Read the running Node.js version

console.log(`Version: ${process.version}`);
console.log(`Node-only version: ${process.versions.node}`);

Prints the running Node.js version, then shows the equivalent version without the leading “v”.

When to use it

Display the runtime version in logs

Startup diagnostics

Record which Node.js version executed a job

Compatibility checks

Obtain an unprefixed version through `process.versions.node`

Version formatting

Interview questions

QWhat does process.version contain?

process.version is a string property on the global process object that reports the running Node.js version. Its value includes a leading v, such as v14.8.0.

Follow-up: How would you obtain the same version without the prefix? Use process.versions.node.

QHow can modern JavaScript access this value?

The property is read directly as process.version, or the named version export can be imported from node:process. Both represent the Node.js version string for the running process.

Follow-up: What module specifier should modern ESM code use for this import? Use the built-in node:process specifier.

QHow does process.version differ from process.versions.node?

process.version identifies the Node.js runtime version, while process.versions.node provides the Node.js version string without the initial v. The latter is useful when a consumer expects an unprefixed value.

Follow-up: What should be used to inspect dependency versions too? Use the broader process.versions object, whose node entry is the Node.js version.

  • process.versions
  • process.versions.node
  • node:process

Source: Process. Checked 2026-10-15.