question

JubitJohn-7092 avatar image
0 Votes"
JubitJohn-7092 asked ·

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

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 https://registry.npmjs.org/envinfo (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>

service-fabric-standalone
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JubitJohn-7092 Did that help answer your question?
Please 'Accept as answer' if it helped, so that it can help others in the community facing the same issue.

0 Votes 0 ·

Is there an update? Did it answer your question?

0 Votes 0 ·

1 Answer

JayDevelops avatar image
1 Vote"
JayDevelops answered ·

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.




·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.