I want to create a react app although "npx create-react-app [app-name]" won't work in my project folder. I get the an "Incorrect integrity when fetching from the cache" error although I'm not familiar with why it's not fetching. The error is below.
=================================
Vincents-MacBook-Pro:Personal-Projects Vince$ npx create-react-app my-app
Creating a new React app in /Users/Vince/Documents/Coding-Projects/Personal-Projects/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.19.0
[1/4] π Resolving packages...
[2/4] π Fetching packages...
error Incorrect integrity when fetching from the cache
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 /Users/mountainthief/Documents/Coding-Projects/Personal-Projects/test-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting test-app/ from /Users/Vince/Documents/Coding-Projects/Personal-Projects
Done.
=================================
I've tried "npm cache clean --force" and uninstalling yarn to no avail.
What could I be missing?
npm cache clean --force
uninstall yarn
Creating a new React app in /Users/Vince/Documents/Coding-Projects/Personal-Projects/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.19.0
[1/4] π Resolving packages...
[2/4] π Fetching packages...
error Incorrect integrity when fetching from the cache
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 /Users/mountainthief/Documents/Coding-Projects/Personal-Projects/test-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting test-app/ from /Users/Vince/Documents/Coding-Projects/Personal-Projects
Done.
I expected a functional React-app complete with node-modules although I received the error:
yarn add v1.19.0
[1/4] π Resolving packages...
[2/4] π Fetching packages...
error Incorrect integrity when fetching from the cache
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
You can also see where the cache is with yarn cache dir.
yarn cache dir
Running yarn cache dir will print out the path where yarnβs global cache is currently stored. When you do a
yarn cache clean
You can check the folder actually cleans. If that fails you can manually delete it. yarn cache documentation
please run both commands again then install your app. Basically this types of error coming due to some package dependencies. So please install all both packages again.
npm install -g create-react-app
and reinstall yarn
If you getting same error after install both the please send me yarn and node version.
https://www.npmjs.com/package/npx
I had the same issue and it has resolved with upgrading global yarn packages.
$ yarn global upgrade
What fixed it for me was to delete the entire global yarn cache dir in the file system which I got via yarn cache dir, here's a one liner for that:
rm -rf `yarn cache dir`
After that yarn global upgrade made it work again:
yarn create react-app my-app --typescript
Happy hacking!
β¨ Done in 22.60s.
This was a simple folder permissions issue for me, a sudo resolved:
sudo npx create-react-app myApp
Related
I'm making a video chat. Every time I create a React app with the command npx create-react-app ./client I'm having this issue. How to fix it, please?
Creating a new React app in `D:\webrtc\client`.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.10
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
[2/4] Fetching packages...
error postcss#8.2.6: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.14.0"
error Found incompatible module.
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 D:\webrtc\client has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting client/ from D:\webrtc
Done.
I'm having trouble to create npx create-react-app .
β€ YN0009: β core-js#npm:2.6.11 couldn't be built successfully (exit code 1, logs can be found here: /C:/Users/acer/AppData/Local/Temp/logfile-10088VPjTiMAhqTi1.log)
β€ YN0009: β fsevents#patch:fsevents#npm%3A1.2.12#builtin<compat/fsevents>::version=1.2.12&hash=77dfe6 couldn't be built successfully (exit code 1, logs can be found here: /C:/Users/acer/AppData/Local/Temp/logfile-10088GGXEekcVAsh7.log)
β€ YN0009: β core-js-pure#npm:3.6.4 couldn't be built successfully (exit code 1, logs can be found here: /C:/Users/acer/AppData/Local/Temp/logfile-10088HJnNDOaZdPmT.log)
β€ YN0009: β core-js#npm:3.6.4 couldn't be built successfully (exit code 1, logs can be found here: /C:/Users/acer/AppData/Local/Temp/logfile-10088nbZGburV304n.log)
β€ YN0000: β Completed in 17.86s
β€ YN0000: Failed with errors in 49.26s
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Users\acer\Desktop\coding tutorial\raraa_react has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
i also used the yarn cache clean and npm cache clean --force.
But nothing is work. Pls help me.
This works for me:
npm install -g npm#latest
npm install node
npm install -g yarn
yarn cache clean
npx create-react-app my-app
check if this file 'C:\Users\your user name\.yarnrc' is not hidden.
it helped me.
If you are using yarn so try cleaning cache.
yarn cache clean this way worked on my end.
try re-installing or updating node and npx. That should do the trick.
for me this was causing me some issues, so I completely uninstalled yarn and yarn globally and this worked
npm uninstall yarn
then:
npm uninstall -g yarn
Then you can reinstall yarn again.
I have similar problem, but not exactly the same.
My error is: cra-template#npm:1.1.2 isn't supported by any available linker
This is yarn problem with new option (PNP, pack node_modules folder into zip)
I solved this by editing yarn configuration file.
Windows: C:\Users\USER\.yarnrc.yml
In this file (even after reinstal whole node) i have (don't know why): nodeLinker: nodeLinker
I check this new option PNP (nodeLinker: pnp), but react is not compatible with this.
So i changed this to - nodeLinker: node_modules
And now is everything ok.
just update your latest npm or yarn package like that :
npm install --global yarn
try to update the node version to latest /curremt version , it works in my case
I had the same errors on yarn install command and what worked in my case was to clean the C:\Users\USER\.yarnrc.yml
And then:
yarn cache clean
yarn install
So I'm trying to run reactjs official tutorial and with the first line of code:
npx create-react-app react-tutorial
...I get the following error:
npx: installed 91 in 12.692s
Creating a new React app in /home/foo/projects/react-tutorial.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.12.3
[1/4] Resolving packages...
warning react-scripts > fsevents#2.0.6: Please update: there are crash fixes
[2/4] Fetching packages...
[-----] 1/1297Missing dependencies in package.json
I read some where else to clean or force clean npm cache but that didn't work either:
npm cache clean --force
I'm on ubuntu running latest node (10.16.0) I also tried with 8.*
It seems that the error is discussed in this issue:
This seems to be a Yarn issue.
The workaround is to use npm instead of yarn:
create-react-app myproject --use-npm
If installing with npm you experience the following error:
npm ERR! cb() never called!
increase the ulimit in your .bashrc, .bash_profile, and/or .profile by updating (or removing) the below command:
ulimit -n 20000
Looks like you are using yarn instead of npm. Try --use-npm flag like this :
npx create-react-app react-tutorial --use-npm
I fixed this issue by installing yarn and then:
npx create-react-app my-app
cd my-app
npm start
Some people uninstalled yarn and used npm instead, I am not sure why npm did not work for me.
Try to upgrade npm version on your system.
Also upgrade your node.js version to the latest one.
I have solved this issue here all steps are written look into it..
reinstall npm(react) using the following command
npm install -g npm-reinstall
to some users, it may ask to audit fix do it
npm audit fix
npm audit fix --force
after it will take 2-5 min then write our command for creating a new project in react using npm
npx create-react-app amazon --use-npm
After the common step to start the server
cd amazon
npm start
I am having a problem creating a react app using, I keep getting an error.
I am using node v10.16.0 and npm v 6.9.0
I looked through many answers already and tried everything that has been suggested including reinstalling node, clearing cache etc.
I typed npx create-react-app clientinto the command prompt
and this is what I get.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.16.0
[1/4] Resolving packages...
error Received malformed response from registry for "react". The registry may be down.
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\xxxx\Documents\Work Project\client has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting client/ from C:\Users\xxxx\Documents\Work Project
Done.
Once you have cleaned the yarn cache by running:
yarn cache clean
Removing yarn cache folder in the AppData folder as well C:\Users\test\AppData\Local\Yarn
then subsequent calls to:
npx create-react-app your-app
This works for me well
I am trying to create react app using: npx create-react-app my-app
and I keep getting this error:
Creating a new React app in /Users/mcohen/Git/andys-tale/andys-blog.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.12.3
[1/4] π Resolving packages...
[2/4] π Fetching packages...
error https://registry.yarnpkg.com/#xtuc/ieee754/-/ieee754-1.2.0.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
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 /Users/mcohen/Git/andys-tale/andys-blog has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting andys-blog/ from /Users/mcohen/Git/andys-tale
Done.
Any suggestions what shall I do?
Delete yarn.lock file
This will help!
I'd probably desperately run yarn cache clean