skip to Main Content

I’m trying to make a simple app with React but I’m stuck at the first step. It doesn’t seem to do anything at all. Tried with both npx create-react-app and npm create vite@latest:

enter image description here

It’s stuck on the loading animation for 10 hours, exact same with both Vite and React.

Using latest Node version.

2

Answers


  1. Creating a React or Vite app can sometimes take longer than expected for several reasons:

    1.Network Speed
    2.Node Modules
    3.System Resources
    4.Package Manager Issues
    5.Temporary Files
    6.Background Processes

    Login or Signup to reply.
  2. There are many possible reasons for npm install to take this long. Normally it takes only a few seconds, especially templates like create-react-app. What you should do is narrow down the issue:

    1. Network Issues

    If you have an unstable or slow internet connection, it will be slower. npm install downloads the JavaScript librarys from npm’s package registry before storing it locally in your node_modules folder.

    Try running ping google.com in the terminal.
    Do you get an output like this?

    ping in terminal

    You could also try speedtest.net. This will similarly tell you how fast your download speed is.

    1. System Resources or Background Processes

    Do you have other apps running? Sometimes this isn’t a big deal, but you can try closing all other processes.

    1. Node Modules

    Sometimes the solution is as simple as deleting the node_modules folder. Once you do this, run npm install again.

    I can’t explain exactly why it would take 10 hours, but these are good places to start to help you isolate the issue. The fact that the same happened with Vite and React suggests one of the above issues.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search