1

PS C:\Users\HP\Desktop> npx create-react-app enda_react
Creating a new React app in C:\Users\HP\Desktop\enda_react.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT npm ERR! request to https://registry.npmjs.org/bfj failed, reason: Socket timeout

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Local\npm-cache_logs\2021-03-10T03_17_13_731Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json Deleting enda_react/ from C:\Users\HP\Desktop Done.

i tried different methods such as
- increase timeout, -upadate npm versions, -unistalled previeous create app and installed new one, -cleared cache,

all these methods doesnt worked for me,someone please help

1
  • 2
    i resolved this problem by using command : npm config set fetch-retry-maxtimeout 60000 -g, note that : you can increase timeout until problome resolved Commented Mar 10, 2021 at 4:02

3 Answers 3

1

I've faced the same issue in node V16.14.0, then I've added a timeout flag to solve this issue.

npx create-react-app clients -timeout=100000

Sign up to request clarification or add additional context in comments.

Comments

0

I had the same problem, then I decided to install react js with this command:

 npm init react-app app-name

Comments

0

Have been using this for more than two years now:

npm config set fetch-retry-maxtimeout 999999999 -g

Usually happens when I've got a slow internet connection.

npm install downloads & installs the packages in package.json. I believe this increases the amount of time you have.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.