Blog

React

Setup

Vite

React Local Setup With Vite

React Vite Local Setup With Vite

Ragav Kumar V

Ragav Kumar V

Jan 25, 2023 — Updated Feb 2, 2023 · 2 min read

  • Choose LTS version, since it is always preferred
  • Restart your PC
Choose LTS version
Choose LTS version
Choose windows if you use windows
Choose windows if you use windows
  • Click Start button
  • Type cmd
  • Open Command Prompt by clicking on the first option
Open `Command Prompt`
Open `Command Prompt`

_1
node -v

  • This should display the installed version of node
  • If it errors then restart your PC and try again
Checks node version
Checks node version

_1
git config --global user.name "Github username"

Provide GitHub username
Provide GitHub username

_1
git config --global user.email "Github email"

Provide GitHub email
Provide GitHub email
Navigate to your project folder
Navigate to your project folder
Replace URL with cmd
Replace URL with cmd

_1
npm create vite@latest react-abc-demo -- --template react

Provide your project name
Provide your project name

_1
cd react-abc-demo

Change directory to the react project
Change directory to the react project

_1
npm install

To install the node_modules for the project

Starts the react app
Starts the react app

_1
npm run dev

Goto to http://localhost:5173/ to see your react app


_1
npm install --save-dev eslint-config-react-app eslint@^8.0.0

Create a file named .eslintrc.json with following contents in the root folder of your project

.eslintrc.json
Copy

_3
{
_3
"extends": "react-app"
_3
}

@ragavkumarv
swipe to next ➡️