Get the current version of Node.js on macOS?

Answered
itsbambi asked this question 1 year, 2 months ago
itsbambi on Mar 28, 2022

How do I get the current version of Node.js installed on my machine?

I'm on a Macbook running macOS Monterey.

Thanks!

3 suggested answers
yaboy01 on Mar 28, 2022
node --version

That will output a version number. Similar to this:

v17.6.0
0 replies
rusty1_rusty1 on Mar 28, 2022

Either of these two will do the trick:

node --version
node -v
0 replies
suparman21 on Mar 28, 2022

NPM has a version command that lists out versions of NPM packages on your machine:

npm version

That will output something similar to this:

{
  test: '1.0.0',
  npm: '8.5.1',
  node: '17.6.0',
  v8: '9.6.180.15-node.13',
  uv: '1.43.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '102',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '3.0.1+quic',
  cldr: '40.0',
  icu: '70.1',
  tz: '2021a3',
  unicode: '14.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}
0 replies
Answered