How to check the current Node version (and why it matters)

You can check the current Node version on your machine with a single command: node -v. That gives you the installed version number instantly. But knowing which version you have is only half the picture. Knowing whether you are on LTS or Current, and what to do if the version is wrong, matters just as much. This article covers all of it, from the one-liner to version management with NVM.

What the current Node version actually is

Node.js ships on two parallel tracks: LTS (Long-Term Support) and Current.

LTS is the version most production teams should be on. Even-numbered major releases (Node 20, Node 22, Node 24) reach LTS status in October of their release year. They then get active support for 12 months followed by maintenance support for another 18 months, 30 months total. That means security patches and bug fixes with very few surprises.

Current is the latest release, which as of 2026 is Node v25 or v26. It gets the newest features first but moves fast and stays supported for only six months. It is fine for experimenting but not a sensible choice for anything you ship to users. Odd-numbered versions (v23, v25) never reach LTS status.

The table below shows the active release lines as of mid-2026:

VersionStatusLTS codenameNotes
v26Currentn/aNewest features, 6-month support
v24Active LTSKryptonBest for new production projects
v22Maintenance LTSJodStill safe, winding down
v20Maintenance LTSIronEOL approaching, plan to upgrade

For most people reading this: if you are not on v24 LTS, you should be.

How to check your Node version on the command line

Open your terminal and run:

node -v

You will see output like:

v24.0.0

The -v flag is shorthand. The long form does the same thing:

node --version

Either works. Both print the same version string.

Example:

check your Node version on the command line

On Windows

Press Win + R, type cmd and hit Enter. Or open PowerShell by right-clicking the Start button. Then run node -v.

On macOS

Open Terminal from Applications then Utilities, or use Spotlight (Cmd + Space, type “Terminal”). Then run node -v.

On Linux

Open the terminal for your desktop environment, or press Ctrl + Alt + T on Ubuntu. Then run node -v.

What it means if you get “command not found”

If the terminal says node: command not found or 'node' is not recognized as an internal or external command, Node.js is not installed on your system, or it is installed somewhere that is not in your PATH.

command not found error

Two things to check:

  1. Try node -v in a new terminal window. A PATH change does not always take effect until you open a fresh session.
  2. If it still fails, Node.js is genuinely not installed. See the install section below.

How to check your Node version programmatically

If you need to read the Node version from inside a running script, to log it at startup or validate it against a minimum requirement, use process.version. Open the Node REPL by typing node in your terminal, then:

process.version
// 'v24.0.0'

Or check it without entering the REPL:

node -e "console.log(process.version)"

The process.versions object (plural) gives you more detail: the V8 engine version, OpenSSL version and npm version bundled with this build. Run node -e "console.log(process.versions)" to see all of them.

check your Node version programmatically

This is useful when you are writing a setup script or a health-check route that should fail loudly if the wrong Node version is running in production.

How to check Node.js version when using NVM

NVM (Node Version Manager) lets you install and switch between multiple Node.js versions on one machine. If you are using NVM, node -v still works, but these commands tell you more:

nvm current    # shows the version active in this shell
nvm list           # lists all installed versions with the active one marked

Output from nvm list looks like:

nvm list command

The arrow points to the version currently in use. nvm current alone prints just that version number, handy for scripts.

On Windows, nvm refers to nvm-windows, a separate tool from the Unix nvm. The commands are similar but not identical. Run nvm list to see installed versions on Windows too.

How to check your npm version

npm (the Node Package Manager) ships with Node.js. Every Node.js install bundles an npm version, so they track together. To see which npm version you have:

npm -v
check your npm version

You might see something like 10.5.0. If you need a newer npm without changing your Node version, you can update npm with:

npm install -g npm

How to read the version number

Node.js follows semantic versioning (semver): MAJOR.MINOR.PATCH. For example, v24.2.1 breaks down as:

  • 24 is the major version. A change here means breaking changes. Going from v22 to v24 may require updates to your code or dependencies.
  • 2 is the minor version. New features added in a backwards-compatible way. No breaking changes.
  • 1 is the patch version. Bug fixes only. Safe to update within the same major.minor.

This matters because most package.json engines fields use semver ranges. If your library says "engines": { "node": ">=20.0.0" } and you are on v18, things will break.

LTS vs Current: which one should you use

For production: LTS. Every time.

For experiments or learning: Current is fine, but do not build on APIs that have not stabilized yet.

Here is a practical way to think about it. The Current version is where new features land first. Six months later, if an even-numbered release goes LTS, those features are now battle-tested and part of a long-term branch. That is the right time to build on them.

If you are starting a new project today, install Node 24 LTS. If you are maintaining something on Node 20 or Node 22, those are still in maintenance and safe but plan a migration. Node v20’s maintenance window ends soon.

One thing that catches beginners off guard: the Node.js download page used to show LTS as the default left button, with Current on the right. That meant most people who just clicked the first button got LTS without thinking about it. That is still broadly good advice. When in doubt, LTS is the answer.

Teams building internal tooling or CLIs sometimes use Current to access a new API that has not made it into an LTS branch yet. That is reasonable, but it requires a plan to upgrade again when that Current version hits end-of-life in six months. Without that plan, you end up on an unsupported version and miss security patches. If you are in that situation, the Node version update guide covers how to move between versions safely.

How to install Node.js if it is not installed

Go to nodejs.org/en/download and download the installer for your OS. The site recommends LTS by default, which is the right choice.

After installation, open a new terminal and run node -v to confirm it installed correctly. If you do not see a version, restart the terminal first before investigating further. See our full Node.js installation and setup guide for step-by-step instructions including your first project.

Installing with NVM instead of the installer

The npm docs recommend using NVM over the system installer for most developers because the installer puts npm in a system directory that can cause permission errors with global package installs. With NVM, each Node version is isolated per user.

On macOS and Linux:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash

After installation, open a new shell session and install the LTS version:

nvm install --lts
nvm use --lts

On Windows, download nvm-windows from the nvm-windows GitHub releases page, run the installer, then:

nvm install lts
nvm use lts

How to update Node.js to the current version

If your node -v shows an older version and you want to update, there are a few paths depending on your OS and how you installed Node.

If you installed with the official installer, download the new version and run the installer again. It upgrades in place.

If you installed with NVM, updating is straightforward:

nvm install --lts                # install latest LTS
nvm use --lts                    # switch to it in this shell
nvm alias default --lts    # make it the default for new shells

Example:

update Node.js to the current version

If you want to upgrade on macOS or Linux using the n package manager, see our guide to updating Node using n. For a full walkthrough across all operating systems, the Node version update guide covers Windows, macOS and Linux individually.

Need to go backwards? Our Node downgrade guide walks through that.

Checking the Node version in package.json

If you are working on a project that specifies its Node requirement, look at package.json for the engines field:

{
  "engines": {
    "node": ">=20.0.0"
  }
}

This tells you the minimum version the project supports. If your node -v output is below that range, you will get errors or unexpected behavior. This field is also where you should document your own project’s Node requirement, so teammates and CI environments know what to install.

The engines field is advisory by default. npm does not enforce it unless you pass --engines-strict or set engine-strict=true in your .npmrc. If you are running a CI pipeline, it is worth adding an explicit node version check at the top of your build script so mismatched environments fail fast with a clear error rather than halfway through a build with a cryptic stack trace.

You can also pin an exact Node version per project using an .nvmrc file in the project root:

24.0.0

Then anyone with NVM installed just runs nvm use in that directory and NVM switches to the right version automatically. No memorizing, no version drift.

Key takeaways

  • Run node -v or node --version to check your installed Node.js version.
  • “command not found” means Node is not installed or not in your PATH.
  • Node 24 is the Active LTS as of 2026 and is the right choice for production.
  • LTS versions get 30 months of support while Current versions get only 6 months.
  • Run npm -v to check your npm version. npm ships bundled with Node.
  • Use process.version to read the Node version from inside a running script.
  • NVM is the recommended way to install and manage multiple Node versions.
  • The version number follows semver: MAJOR.MINOR.PATCH.
  • Odd major versions (v23, v25) are Current only and never reach LTS.
  • Check the engines field in package.json to see what version your project requires.

FAQ

How do I check my current Node.js version?

Run node -v or node --version in your terminal. It prints the installed version instantly, like v24.0.0.

What is the current Node.js LTS version in 2026?

As of mid-2026, Node 24 (codenamed Krypton) is the Active LTS version and the right choice for new production projects.

What does “command not found” mean when running node -v?

It means Node.js is not installed on your system or the binary is not in your shell’s PATH. Install Node.js from nodejs.org or use NVM.

How do I check the Node.js version inside a script?

Use process.version. It returns the version string like 'v24.0.0' from inside any running Node.js process.

What is the difference between LTS and Current Node.js versions?

LTS (even-numbered versions) get 30 months of support and are stable for production. Current (odd-numbered) gets only 6 months and is for early adopters testing new features.

How do I see all Node.js versions installed on my machine?

If you use NVM, run nvm list to see every installed version with the active one highlighted.

How do I check the npm version?

Run npm -v in your terminal. npm is bundled with Node.js so they are usually updated together.

Node.js is one of those tools where a wrong version causes hours of confusing errors. Running node -v before starting any project takes two seconds and saves a lot of debugging later.

Aditya Gupta
Aditya Gupta
Articles: 505