DEV Community

Silla Priyadarshni for Spectrum Club

Posted on

How to fix errors and not get stuck while installing react?

Hello, I know you are having a tough time while installing react and you are just tired of trying all the possible ways to get rid of any of npm/missing script/missing directories(no public, src, no template)/config directory/complete log found somewhere/just stuck (xD) errors. Take a chill pill and trust the process. It's easy-peasy.

Note: I own a laptop having 64-bit windows operating system and I got all of these errors.

Snapshot of error:

  • getting stuck

Alt Text

Solution:

  1. So far, you might have used either npm/npx ways to create the react app. Now, Open cmd in a new window along with the ongoing loading window and type "resmon". This directs you to Resource Monitor where you need to check "cmd.exe" files and resume those process if in suspended mode. To do so, right-click on "cmd.exe" and select "Resume Process".
    Alt Text

  2. You will see the processes continuing in the cmd window and the template loading along with public, src and all other required modules. "Happy hacking" denotes successful installation.
    Alt Text

  3. Now change the directory where the app is created using "cd" command and type "npm start" to start the development server. (If you won't get into that specific folder, you will get this error mentioned in the below image.) Alt Text
    Development server starts..
    Alt Text
    Get the URL and check if it's running. Kudos you did it.
    Alt Text

Happy learning :)
Feel free to ask or comment in case of any errors.

Top comments (1)

Collapse
 
santoshpenugurthi profile image
Santosh Penugurthi

Thanks a lot, it works for me and saves my time