In a debugger for nodejs , there is a command to show the V8 version and the debugger package version. How can I get the nodejs version?
I imagine I can basically run a command node --version
or nodejs --version
, but I'm hoping there a is way to do with without running an external shell command – which is not only slower but, depending on paths, might give a different answer.
使用process.version
获取正在运行的Node版本:
console.log('Node version is: ' + process.version);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.