I Have been trying to run React on my local system using the Hyper terminal I typed the code: npx create-react-app my-apps
it keeps flagging these errors below:
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/@svgr%2fplugin-svgo failed, reason: connect ETIMEDOUT 104.16.26.35:80
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\Edmund Obinna\AppData\Local\npm-cache\_logs\2022-02-21T12_17_44_191Z-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... package.json
Deleting my-apps/ from C:\Users\Edmund Obinna
Done."
try:
npm config rm proxy
then:
npm config rm https-proxy
I faced the same issue, I was not behind any proxy, and fixed it by just updating node and npm.
Install n:
npm i -g n
Update node using n:
n lts
Update npm:
npm i -g npm
And then create your react app:
npx create-react-app my-apps
I would also suggest using yarn:
yarn create react-app my-apps
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.