I Reinstalled Node.js and Yarn. Now I am getting this error.
My environment information is:
Node: v8.12.0
NPM: 6.4.1
Yarn: 1.10.1
OS: Windows 10
PS C:\Users\mdbel\Desktop\Project\redux> npx create-react-app learnredux
Creating a new React app in C:\Users\mdbel\Desktop\Project\redux\learnredux.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.1.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\mdbel\\Desktop\\Project\\redux\\learnredux\\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 --cwd C:\Users\mdbel\Desktop\Project\redux\learnredux has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
Try this!
npm install -g npm@latest
npm install node
npm install -g yarn
npx create-react-app appname
cd firstapp
yarn start
I had a same problem then i tried the below Command and it fixed my issue
The above command didn't solved your problem then try the below one.
I faced the same issue when using
npx
and was able to resolve this with the following steps:$ npm i @yarn@latest
If the issue still persist you can use yarn command instead :
$ yarn create react-app learnredux
yarn create
is available in Yarn 0.25+I had the same error on my Mac.
I just re-downloaded the installer from the Node.js website. This should reinstall all the dependencies and make sure that all paths are valid.
https://nodejs.org/en/download/
I solved this problem by deleting
.yarnrc
file fromC:\Users\yourUserName\
Once you have cleaned the yarn cache by running:
then subsequent calls to:
will work.