Node.js Installation

For Linux (Using NVM)

1

Install NVM (Node Version Manager)

  1. Open a terminal and install NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
  1. Restart the terminal or run:

source ~/.bashrc
2

Install Node using NVM

  1. Install Node.js LTS version

nvm install --lts
  1. Set the default Node.js verison (optional)

nvm use --lts

3

Verify Installation

  1. Check the Node.js Version:

node -v

output should be similar to:

v22.12.0
  1. Check the npm version:

npm -v

Output should be similar to:

10.9.0

For Windows and MacOS

1

Download Node.js

  1. Download the Windows Installer (.msi) or macOS Installer (.pkg) fir the desired version (LTS or Current)

2

Install Node.js

  1. Open the downloaded .msi or .pkg file.

  2. Follow the installation wizard, ensure npm is selected for installation.

3

Verify Installation

  1. Open Command Prompt, Powershell or Terminal and run:

node -v
npm -v

Last updated