0
votes

While I'm Tring to create a new react app I'm getting an error message below,

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ECONNRESET npm ERR! errno ECONNRESET npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/jest-resolve: aborted 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: npm ERR!
C:\Users\Akhlak Hossain Jim\AppData\Local\npm-cache_logs\2020-11-17T06_20_31_124Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json Deleting new-react/ from J:\learning_time_practices Done. npm ERR! code 1 npm ERR! path J:\learning_time_practices npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c ""create-react-app" "new-react" "--use-npm""

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Akhlak Hossain Jim\AppData\Local\npm-cache_logs\2020-11-17T06_20_31_497Z-debug.log

3

3 Answers

1
votes

Can you try first this one npm config set registry http://registry.npmjs.org/? then try again to execute npx create-react-app [your_app_name]

0
votes

In my case, Antivirus was the culprit which was blocking some files at the time of npx operation. This helped my case

0
votes

There May be a problem with automatic proxy setup, try this out

go to settings> Network and Internet > Proxy

and then under Automatic proxy setup turn off Automatically detect settings on Windows. And then open a command prompt and type the following command.

npm uninstall -g create-react-app

It worked for me.