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:

3 Answers3

0

Try clear the cache and install again

npm cache clear --force

npm install

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

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
  • 435
  • 3
  • 14