How to install Node.js and npm?

QuestionsQuestions8 SkillsProReact Setup and First AppOct, 25 2025
0153

To install Node.js and npm, you can follow these steps depending on your operating system:

For Ubuntu (Linux):

  1. Update your package index:

    sudo apt update
  2. Install Node.js and npm:

    sudo apt install nodejs npm

For macOS:

You can use Homebrew to install Node.js and npm:

  1. Install Homebrew if you haven't already:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install Node.js (npm is included):

    brew install node

For Windows:

  1. Download the Node.js installer from the official Node.js website.
  2. Run the installer and follow the prompts. npm will be installed automatically with Node.js.

Verify Installation:

After installation, you can verify that Node.js and npm are installed correctly by running:

node -v
npm -v

This will display the installed versions of Node.js and npm.

0 Comments

no data
Be the first to share your comment!