Menu

How to Install Node.js and npm for ReactJS

Installing Node.js and npm

Installation Steps

  1. Go to the official Node.js website: https://nodejs.org
  2. Download the LTS version. LTS means Long Term Support it is the stable release, and it is what you want.
  3. Run the installer and accept the default options.
  4. Restart your terminal (or Command Prompt) after installation.

Verifying the Installation

Open your terminal and run:

node --version
npm --version

Output

You should see two version numbers, something like:

v22.14.0
10.9.2

Your exact numbers will differ. Any current LTS version works for this tutorial.

Common Mistakes Beginners Make

  • Typing node -version with a single dash. The correct flags are node --version (two dashes) or node -v (single dash, single letter).
  • Not restarting the terminal. If the command is not recognised immediately after installing, close the terminal completely and open a new one.
  • Installing the "Current" version instead of LTS. The Current release carries newer features and more instability. Use LTS.
  • Getting 'node' is not recognized. This means Node is not on your system PATH. Reinstall using the official installer and let it configure PATH automatically.

ReactJS Tutorial

VA

Vishalini A



Learn via Video Course

React.js for Beginners: Build Modern Web Applications with React Logo

React.js for Beginners: Build Modern Web Applications with React

6 hrs



Get in Touch For Details