Get the node.js version at runtime

Peter picture Peter · Jan 28, 2012 · Viewed 25.2k times · Source

I'm having some compatibility issues with old versions of node.js.

Is there any way to get the node.js version at runtime?

Answer

Dan D. picture Dan D. · Jan 28, 2012
> process.version
'v0.6.8'
> process.versions
{ node: '0.6.8',
  v8: '3.6.6.19',
  ares: '1.7.5-DEV',
  uv: '0.6',
  openssl: '0.9.8g' }