Tutorials

Tutorials

Get Advanced Microsoft Office & Python Training

For any query mail at: uniqueshikshapoint@gmail.com

How to Install ReactJs on the System

How to Install ReactJs on the System:

  1. Install Node js and npm (https://nodejs.org/en/). Install LTS
  2. Install Visual Studo code/sublime/Atom/Bractkets (https://code.visualstudio.com/)
  3. Install React from terminal
    1. npm install –g create-react-app (Install it in C drive)
    2. create-react-app --version (To check version of create react app in C drive)
    3. create-react-app <projectname> (Create a folder in D drive using following command)

C:\Users\SANJAY>node -v

v18.12.1

C:\Users\SANJAY>npm -v

8.19.2

C:\Users\SANJAY>npm install -g create-react-app

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

C:\Users\SANJAY>create-react-app --version

5.0.1

C:\Users\SANJAY>d:

D:\>mkdir reacttest

D:\>cd reacttest

D:\reacttest>create-react-app testingapp

Creating a new React app in D:\reacttest\testingapp.

Success! Created testingapp at D:\reacttest\testingapp

Inside that directory, you can run several commands:

  npm start

    Starts the development server.

  npm run build

    Bundles the app into static files for production.

  npm test

    Starts the test runner.

  npm run eject

    Removes this tool and copies build dependencies, configuration files

    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

 D:\reacttest>dir

D:\reacttest>cd testingapp

D:\reacttest\testingapp>npm start

Compiled successfully!

You can now view testingapp in the browser.

  Local:            http://localhost:3000

  On Your Network:  http://192.168.56.1:3000

node_modules folder : The node_modules folder is used to save all downloaded packages from NPM in your computer for the JavaScript project that you have. Developers are always recommended to do a fresh install with npm install each time they downloaded a JavaScript project into their computer.



:19/02/2023