Node.js Reference ยท process
Node.js process.version and process.versions
Reference for process.version and process.versions in Node.js: read the runtime version, compare versions safely and inspect bundled V8, OpenSSL and ICU.
process.version is a string with the version of the running Node.js, including a leading v, for example v24.22.0. process.versions is an object that lists the version of Node and of every major library bundled into it: V8, libuv, OpenSSL, zlib, ICU, SQLite and more.
Use them for diagnostics, bug reports and, carefully, for deciding whether a feature is available. The values belong to the binary, so they never change while the program runs.
console.log(process.version); // v24.22.0 console.log(process.versions.v8);
Try it
Press Run (or Ctrl + Enter) to see the result here.
Program input ยท what you'd type while the program runs
Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.
Press Run (or Ctrl + Enter) to see the result here.
Program input ยท what you'd type while the program runs
Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.
Syntax
process.version: string process.versions: { node: string, v8: string, uv: string, zlib: string, openssl: string, modules: string, [name: string]: string }
| Property | Description |
|---|---|
process.version |
'v' + major.minor.patch, with a suffix for pre-releases such as -nightly.... |
versions.node |
The same number without the v. |
versions.v8 |
Version of the V8 JavaScript engine (includes an embedder suffix). |
versions.uv |
libuv, the library behind the event loop and I/O. |
versions.openssl, versions.zlib, versions.icu, versions.unicode, versions.sqlite |
Bundled libraries; which keys exist depends on how Node was built. |
versions.modules |
The native addon ABI number (NODE_MODULE_VERSION). |
Returns: strings only. The versions object is read-only.
Usage notes
- Never compare versions as strings.
'9.0.0' > '24.0.0'istruebecause characters are compared one by one. Split into numbers, or use a semver library. - Prefer feature detection (
typeof Array.fromAsync === 'function') over version checks; polyfilled or backported features are handled correctly. - State your supported versions in
package.jsonunderengines.node; npm warns when it does not match, andengine-strictcan make it an error. - Native addons depend on
versions.modules. When it changes (usually every major release) compiled addons must be rebuilt. - Keys vary. A custom or distro build may omit some libraries, so check before reading
versions.sqliteorversions.icu. - Even major versions (22, 24...) become Long-Term Support; odd ones are short-lived current releases. See
process.release.lts. - Include
process.versionsin bug reports along withprocess.platformandprocess.arch.