Node.js Installation

Node.js Installation
Node.js Installation is mainly 3 ways:
- Using Official Installer (Recommended)
- Using Node Version Manager (NVM)
- Using Package Manager (Linux)
Below is the step-by-step guide.
1. Install Node.js on Windows (Recommended)
Step 1: Go to the official download page
Step 2: Download LTS (Recommended) version
Example:
Node.js 20.x LTS
Step 3: Run the Installer
Double-click the .msi file and follow the steps:
Accept license
Choose installation directory
Keep default settings
Install Node.js + npm
Step 4: Check installation
Open CMD or PowerShell:
If these show versions, Node.js is installed successfully.
2. Install Node.js on macOS
Option 1: Official Installer
Download .pkg file from:
Then run the installer → next → next → finish.
Option 2: Install using Homebrew
Check versions:
3. Install Node.js on Linux (Ubuntu / Debian)
Update system:
Install Node.js + npm:
Check versions:
4. (Optional but Recommended) Install Node Version Manager (NVM)
NVM lets you install and switch between multiple Node.js versions.
Install NVM (Linux/macOS):
Restart terminal, then run:
Check version:
Install NVM for Windows
Download from:
👉 https://github.com/coreybutler/nvm-windows/releases
Then install Node.js using:
Verify Node.js Installation
Create a file:
Add:
Run:
If it prints the message — Node.js is successfully installed!
