Type:
stringThe process.version property contains the Node.js version string.
import { version } from 'node:process'; console.log(`Version: ${version}`); // Version: v14.8.0
const { version } = require('node:process'); console.log(`Version: ${version}`); // Version: v14.8.0
To get the version string without the prepended v, use
process.versions.node.