Lesson 2 of 30

Node.js Installation

Chapter 2

Node.js Installation

Learn how to install Node.js and verify your development environment.

Theory

Node.js can be installed on Windows, macOS, and Linux. After installation, two important commands can be used to verify the setup: node -v npm -v The first command displays the installed Node.js version. The second command displays the installed NPM version. NPM stands for Node Package Manager and is included with Node.js installations.

Example

Node.js Example
node -v

npm -v

Output

The terminal displays the installed Node.js and NPM versions.

Practice

Install Node.js on your computer and verify both Node.js and NPM versions.

Interview Questions

1.

How do you check the Node.js version?

2.

What is NPM?

3.

How do you verify that Node.js is installed?

Quick Quiz

Which option best matches this chapter?

A.node -v
B.python --version
C.java -version
D.git --node

Answer: node -v