Loading

Quipoin Menu

Learn • Practice • Grow

node-js / Installing Node.js
tutorial

Installing Node.js

Before you can start building amazing things with Node.js, you need to install it on your computer. Don't worry – it's a simple process whether you're using Windows, Mac, or Linux. Let's get Node.js up and running!

What You'll Get

When you install Node.js, you get two important things:
  • Node.js Runtime: The actual environment to run JavaScript code.
  • npm: Node Package Manager – comes with Node.js and helps you install libraries.

Think of Node.js as the engine of a car, and npm as the GPS that helps you find and install parts (packages) for your car.

Installing on Windows

  1. Go to the official Node.js website: https://nodejs.org
  2. You'll see two versions: LTS (Long Term Support) and Current.
  3. Download the LTS version – it's more stable and recommended for beginners.
  4. Run the downloaded `.msi` installer file.
  5. Follow the installation wizard:
- Accept the license agreement
- Choose installation location (default is fine)
- Select components (keep default)
- Click "Install"

Installing on Mac

Method 1: Official Installer
  1. Go to https://nodejs.org
  2. Download the macOS installer (.pkg file).
  3. Open the downloaded file and follow the instructions.

Method 2: Using Homebrew (Recommended for developers)
brew install node

Installing on Linux

Ubuntu/Debian:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

Fedora/RHEL:
sudo dnf install nodejs
sudo dnf install npm

Verifying Installation

After installation, open your terminal (Command Prompt on Windows, Terminal on Mac/Linux) and type:
node --version
npm --version

You should see version numbers like `v18.12.0` (for Node) and `8.19.2` (for npm). If you see these, congratulations – Node.js is successfully installed!

Your First Node.js Program

Create a new file called `hello.js` and add this line:
console.log("Hello, Node.js!");

Now run it:
node hello.js

You should see: `Hello, Node.js!`

Troubleshooting

ProblemSolution
`node` is not recognizedRestart your terminal/computer. If still not working, add Node to PATH manually.
Permission denied (Linux/Mac)Use `sudo` before commands or fix npm permissions.
Old version installedUse `nvm` (Node Version Manager) to manage multiple versions.

Two Minute Drill

  • Download Node.js from nodejs.org (LTS version recommended).
  • Installation is straightforward on Windows, Mac, and Linux.
  • Verify installation with `node --version` and `npm --version`.
  • Create a `.js` file and run it with `node filename.js`.
  • Node.js comes with npm – the largest package ecosystem in the world!

Need more clarification?

Drop us an email at career@quipoinfotech.com