1

I am unable to start react project using create-react-app. I waited for an hour but there was no response in the terminal. I have also tried reinstalling node.js and run the following commands

-> npm cache clean --force
-> npm install -g create-react-app
-> npx create-react-app hello-world

But these didn't work. My node version:10.18.0, npm version:6.13.4.

  • After running `npx create-react-app hello-world` you need to run `cd hello-world` and then `npm run start`, Did you do that? – Shmili Breuer Jan 02 '20 at 15:15
  • This message was appear after running npx create-react-app hello-world, Creating a new React app in C:\Users\suche\Desktop\hello-world Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template... I waited for an hour after running this but there was no response in terminal. – Sucheta Singha Jan 02 '20 at 15:33
  • Is the terminal still running? the app wont start after it is done, you need to follow the steps I wrote in my previous comment after the app is done creating. – Shmili Breuer Jan 02 '20 at 15:36
  • The terminal is still running and no response found. app was not created completely. – Sucheta Singha Jan 02 '20 at 15:57
  • I have had this issue a few times, I just closed the terminal and started again, some reasons that may cause this is poor/no internet connection, proxy firewall. hope this helps. – Shmili Breuer Jan 02 '20 at 16:07

2 Answers2

0

Creating a react application and make it running

Steps

  1. Install Node js
  2. Install create-react-app by running npm i create-react-app (add -g for install globally) npm i -g create-reaact-app
  3. Create a application by running create-react-app hello-world (can't use capitalised as create-react-app Hello-World you can read more here)
  4. Moving to the folder by running cd hello-world
  5. Running the application npm start (Default port will be 3000, if anything is running in 3000 in terminal it will ask you to open in another port just type y, difference between npm start and npm run start here)
  6. Thats it your application will be running in the Port.
Learner
  • 8,379
  • 7
  • 44
  • 82
0

If you have installed create-react-app globally. remove that globally from you system and upgrade your nodejs version Upgrading Node.js to latest version

Try these steps-

1-Upgrade nodejs

2- npm uninstall -g create-react-app

3-

npx create-react-app app_name
cd app_name
npm start

Note- npx comes with npm 5.2+ and higher, see instructions for older npm versions

for your reference reactjs documentation

akhtarvahid
  • 9,445
  • 2
  • 26
  • 29