How to Install Node.js

Introduction

Node.js is a powerful JavaScript runtime that allows you to run JavaScript outside the browser. It’s used for building servers, tools, APIs, and full-stack applications. This guide will help you install Node.js on Windows, macOS, or Linux.

Step 1: Download Node.js

Visit the official Node.js website:

https://nodejs.org/

You will see two versions:

Select the installer for your operating system:

Step 2: Install Node.js

Windows

macOS

Linux

Step 3: Verify Installation

Open your terminal and type:

node --version
npm --version

If Node.js is installed correctly, both commands will show version numbers. NPM (Node Package Manager) is included automatically.

Step 4: Install a Package

To test NPM, install a simple package:

npm install -g cowsay

Then run:

cowsay Hello Node.js!

You should see a fun ASCII cow message — this confirms everything works.

Troubleshooting

Conclusion

Node.js is an essential tool for modern development. With it installed, you can build servers, tools, scripts, and full applications using JavaScript.

You’re now ready to explore Node.js packages, frameworks, and powerful development tools.