1

npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/html-webpack-plugin: Socket timeout npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:

5 Answers5

1

Try clear the cache and install again

npm cache clear --force

npm install

you can try use yarn too.. because it uses backup sources.

Jhony Spark
  • 139
  • 4
0

i recommande to work with yarn npm install --global yarn yarn create react-app my-app

else you need to clean the cache npm cache clean --force // clean the cache npm cache verify //verify the cache

npx create-react-app my-app // create you react app npm i

  • Could you explain why he should use yarn? – Kristo Mar 21 '22 at 09:18
  • speed:Yarn installs packages in parallel. Yarn is optimized to fetch and install multiple packages simultaneously. If you are installing five packages, and two are taking a long time to install, Yarn will go over and install the packages side by side. On the other hand, NPM would install each package one at a time. security yarn check the resource of the package – Iyadchafroud Mar 21 '22 at 10:25
0

I wanted to run an existing react project too, and I got the same errors while running: npm install

I had node version 16.15.0 and I upgraded to version 18.1.0,

I run npm install and everything was finally fine.

Check this out: https://github.com/facebook/create-react-app/issues/12330

You may also revert to node version 16.4.16 and see if that works for you. How to downgrade Node version

Cyebukayire
  • 795
  • 7
  • 14
0

My friend I was facing the same problem as me and I found the solution I hope it works out for you First Step : Download Latest Version Of Node Js Second Step : Download Npm Latest Version (Latest Version Important) by npm install -g npm@latest in Cmd Or Terminal Visual Studio Code

Then

Check Of in Cmd Or Terminal Visual Studio Code Any you Want It's Up To You node -v => Should Display Number Represent Node Version npm -v => Should Display Number Represent Npm Version

Then

Write ((npx create-react-app app-name) => Any Name You Want) I hope with all my heart that this solution will work

0

This Will fix the issue:

  • npm config set fetch-retries 5
  • npm config set fetch-retry-mintimeout 600000
  • npm config set fetch-retry-maxtimeout 1200000
  • npm config set fetch-timeout 1800000
Nader_B
  • 11
  • 3