version
The process.version
property contains the Node.js version string.
import { version } from 'node:process';
console.log(`Version: ${version}`);
// Version: v14.8.0
Content copied to clipboard
To get the version string without the prepended v, useprocess.versions.node
.
Since
v0.1.3