0

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'

Agus Rifaldi
  • 19
  • 1
  • 4

2 Answers2

1

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
dilbro
  • 35
  • 7
0

Try this :

npm install -g yarn

yarn global add create-react-app

create-react-app my-app
  • still not working mate – Agus Rifaldi Dec 22 '21 at 03:00
  • Try : `npm config set registry http://registry.npmjs.org/` For npm to use an `http` request instead of an `https` request and then try the same `npm install` command. Source : [link](https://stackoverflow.com/questions/18419144/npm-not-working-read-econnreset) – Horly Andelo Dec 22 '21 at 10:34