1

Hi guys Am getting an error while creating an react app don't know what's going on wrong please try to fix my error and also tell me what should i do?

note :: my internet in working

F:\React JS>npx create-react-app project

Creating a new React app in F:\React JS\project.

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

yarn add v1.22.10
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/react: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80".
info If you think this is a bug, please open a bug report with the information provided in "F:\\React JS\\project\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts cra-template --cwd F:\React JS\project has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.

1 Answers1

1

You need the latest version of yarn, npm, and node. Please make sure they are up to date.

You can try like this

npm install -g npm@latest

This will install npm globally (the meaning of put -g) and the latest version.

nvm install node

nvm installs Node.js and npm manages packages.

Finally npm install -g yarn

This might work perfectly if you have a good internet connection.

SE32433
  • 91
  • 6
  • okay i will try –  Nov 24 '20 at 06:06
  • i tried it all method that mentioned above but its not working You can checkout my all updated version https://ibb.co/tmyyB4M –  Nov 24 '20 at 12:29