Home > Enterprise >  why browser do not display anything while creating a react app
why browser do not display anything while creating a react app

Time:12-31

  1. I am creating a react app for the first time. I have finished all the installation and it doesn't display anything on browser how can I fix it?

  2. shall I be online always as I'm creating a new react-app?

I have finished all the installation

CodePudding user response:

If you use npx create-react-app to create boilerplate for your react app, then the app will open automatically in the browser when you start it with npm start

CodePudding user response:

you need to use NPM or YARN on console to start the live server on your browser.

My metod of choise: -execute "cmd" on windows -type "cd" and the rute to the folder of the project -type: npm create vite -type: the name of the project -select react and -select javascript -cd to the new folder created -type: npm install -type: npm run dev, and you can see the localhost port and open on chrome for example.

  • Related