npx Create-react-app app names keeps on failing in vs Code

Jubit John 1 Reputation point

The command "npx Create-react-app app" keeps failing in vs code .I tried reinstalling and updating node.js and npm but the error still persist,,i have shared the error message below:

S C:\Users\sibythomas\Desktop\react> npx create-react-app first
npm ERR! Response timeout while trying to fetch (over 30000ms)

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sibythomas\AppData\Roaming\npm-cache_logs\2020-04-27T15_33_16_252Z-debug.log
Install for [ 'create-react-app@latest' ] failed with code 1
PS C:\Users\sibythomas\Desktop\react>

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
257 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jayesh Tiwari 36 Reputation points

    This issue could be due to a slow internet connection. Timeout is set to 30000 ms which is 30 seconds by default. Try increasing the timeout to 60 seconds instead by adding this to to create-react-app.

    npx create-react-app <app name> -timeout=60000

    This will set the timeout to 60 seconds which will provide enough time to ge the required resources from npm registry for new react app.

    3 people found this answer helpful.

  2. moondaddy 911 Reputation points

    @JayDevelops answer did not help me. I have killer 1gb bandwidth and its currently downloading close to that and uploads are fast too.

    Any other ideas for this problem?

    0 comments No comments

  3. Oussama Bouhafi 0 Reputation points

    as @Jayesh said the issue is probably in slow internet connection and i tried his his solution it didn't worked for me, but i remembered that i know the internet in the middle east is the worst that's why you should increase the timeout i sugget to try npx create-react-app <app name> -timeout=120000 or more it depends on how your internet is worse, try to increase the timeout more if it didn't work hope it work for you guys

    0 comments No comments