Installing Node.js and npm

Installing Node.js and npm

 

Node.js:

Node.js is a JavaScript runtime that allows you to run JavaScript code on the server side. It also includes npm (Node Package Manager), which is used to manage and install JavaScript packages.

For Windows:

  • Visit the official Node.js website at https://nodejs.org/.

  • On the homepage, you will see the "LTS" (Long-Term Support) version. It's recommended for most users.

  • Download the Windows Installer (.msi file).

  • Run the installer and follow the prompts.

  • Once the installation is complete, open a command prompt and run the following commands to verify the installation:

node -v npm -v

For macOS:

  • Download the macOS Installer (.pkg file) from the official website.

  • Run the installer and follow the prompts.

  • Open a terminal and run the same verification commands:    

    node -v     npm -v

For Linux (Debian/Ubuntu):

  • Open a terminal and run the following commands:

  • sudo apt update sudo apt install nodejs npm
    To verify the installation:

     node -v  , npm -v

    npm (Node Package Manager):

    npm is installed automatically when you install Node.js, and it's used to manage JavaScript packages and dependencies.

    • To update npm to the latest version, run:

    npm install -g npm

    This command installs the latest version of npm globally.

    Now that you have Node.js and npm installed, you are ready to create React applications using tools like Create React App or set up your projects with the necessary dependencies. You can check for updates and learn more about Node.js and npm by visiting their official documentation:

       







    Post a Comment

    Previous Post Next Post