Languages

Install Node.js

The latest long-term-support version of Node.js, with npm.

Tested on macOS 26 Tahoe · Oct 2026
Tested on Ubuntu 24.04 · Oct 2026
Tested on Windows 11 24H2 · Oct 2026
  1. Install Node.js
    Terminal
    brew install node

Check it worked

  1. Check the versions
    Terminal
    node --version && npm --version
Undo it
  1. Uninstall Node.js
    Terminal
    brew uninstall node
  1. Install nvm (Node Version Manager)
    Terminal · Ubuntu / Debian
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

    The version in Ubuntu's own apt is usually old, so nvm is the better route.

  2. Load nvm into this terminal
    Terminal · Ubuntu / Debian
    source ~/.bashrc
  3. Install the latest LTS version
    Terminal · Ubuntu / Debian
    nvm install --lts

Check it worked

  1. Check the versions
    Terminal · Ubuntu / Debian
    node --version && npm --version
Undo it
  1. Uninstall Node.js
    Terminal · Ubuntu / Debian
    nvm uninstall --lts
  1. Install Node.js LTS
    PowerShell
    winget install OpenJS.NodeJS.LTS

    Close and reopen PowerShell afterwards.

Check it worked

  1. Check the versions
    PowerShell
    node --version; npm --version
Undo it
  1. Uninstall Node.js
    PowerShell
    winget uninstall OpenJS.NodeJS.LTS