Hiya 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
:
It’s stuck on the loading animation for 10 hours, exact same with both Vite and React.
Using latest Node version
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
Ashrafkhan Azamov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
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:
- 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?
You could also try speedtest.net. This will similarly tell you how fast your download speed is.
- 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.
- Node Modules
Sometimes the solution is as simple as deleting the node_modules
folder.
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.
1