Home > OS >  how can I fix this problem npm error to install my react app?
how can I fix this problem npm error to install my react app?

Time:03-21

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:

CodePudding user response:

Try clear the cache and install again

npm cache clear --force

npm install

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

CodePudding user response:

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

  • Related