Node.js Installation
Node.js Installation
Node.js can be installed in 3 main 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
๐ https://nodejs.org
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:
๐ https://nodejs.org
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!
