node.js - How do I get the nodejs version inside a nodejs program? -


in debugger nodejs, there command show v8 version , debugger package version. how can nodejs version?

i imagine can run command node --version or nodejs --version, i'm hoping there way without running external shell command – not slower but, depending on paths, might give different answer.

use process.version version of node running:

console.log('node version is: ' + process.version);