Node.js Setup Guide (Mac & Windows)
Node.js Setup on MacOS
Step 1: Download Node.js
- Go to the official Node.js website:
- 👉 https://nodejs.org/en
- Click on Download Node.js (LTS) version.
- (LTS means Long Term Support – best for most users.)
Step 2: Install Node.js
- Open the downloaded file and complete the installation steps.
- Once installed, Node.js and npm (Node Package Manager) will be available.
Check Installed Versions
Open Terminal.
Type the following commands to verify installation:
node -v
npm -v
This will show you the version numbers of Node.js and npm installed.
Node.js Setup on Windows
Step 1: Download Node.js
- Go to:
- 👉 https://nodejs.org/en
- Click on the Download Node.js (LTS) version.
Step 2: Install Node.js
- Run the downloaded setup file and complete the installation.
- This installs both Node.js and npm.
Step 3: Check Installed Versions
- Open Command Prompt (CMD).
- Run these commands:
node -v
npm -v
You should see version numbers if everything was installed correctly.
Install VS Code Editor
To write and run Node.js code smoothly, install Visual Studio Code (VS Code) — a lightweight code editor.
For macOS:
- Visit: https://code.visualstudio.com/
- Click Download for macOS and follow the install instructions.
For Windows:
- Same site: https://code.visualstudio.com/
- Click Download for Windows.
Once installed, open VS Code and start coding in JavaScript and Node.js easily.