$ npx create-react-app amazon-clone
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Creating a new React app in D:\js\faceboom.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network 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:
npm ERR! C:\Users\CCS LAPTOP HYD\AppData\Local\npm-cache\_logs\2022-09-15T13_21_13_774Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting amazon-clone/ from D:\js
Done.
Asked
Active
Viewed 457 times
-1

Heretic Monkey
- 11,687
- 7
- 53
- 122

abdullah khan
- 11
- 2
-
1So it says you have bad network settings - have you investigated that? – mikemaccana Sep 15 '22 at 13:41
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 15 '22 at 21:00
1 Answers
1
Clear your cache using the below command:
$ npm cache clean --force
and then try again creating the react app
npx create-react-app amazon-clone
If that doesn't work, try providing a timeout
option:
npx create-react-app amazon-clone -timeout=60000

kavigun
- 2,219
- 2
- 14
- 33
-
-
You could increase the timeout time if 60 sec not working for you. It should work. – kavigun Sep 15 '22 at 20:15
-
```npx create-react-app amazon-clone -timeout=60000``` this one worked for me. – iamtheasad Jul 19 '23 at 00:55