'error network while installing create-react-app
i've tried many times when installing create react app but it always error connection, but my internet connection is really stable
npx create-react-app my-app
npm ERR! code ECONNRESET npm ERR! syscall read npm ERR! errno ECONNRESET npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/@svgr%2fplugin-jsx: read ECONNRESET 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'
Solution 1:[1]
Try this :
npm install -g yarn
yarn global add create-react-app
create-react-app my-app
Solution 2:[2]
I had the same issue this Error occurred because you are using proxy server to connect internet if so stopping using proxy will solve it but if you want to keep up with proxy follow this first clear cache
npm cache clear --force
second:
npm config set registry http://registry.npmjs.org/
third:
npm install -g create-react-app
last:
create-react-app appName
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Horly Andelo |
Solution 2 | dilbro |