Unable to create react, Abort Installation yarnpkg add --exact react react-dom react-scripts cra-template has failed
Asked Answered
L

11

5

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.

Let answered 13/10, 2020 at 7:54 Comment(0)
T
20

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
Tonality answered 27/10, 2020 at 8:56 Comment(0)
M
2

check if this file 'C:\Users\your user name\.yarnrc' is not hidden.

it helped me.

how to uncheck a file as hidden on windows

Malcolm answered 18/6, 2021 at 9:21 Comment(0)
Z
2

If you are using yarn so try cleaning cache. yarn cache clean this way worked on my end.

Zomba answered 31/7, 2021 at 13:54 Comment(0)
F
1

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.

Fauch answered 16/4, 2021 at 15:0 Comment(0)
D
0

try re-installing or updating node and npx. That should do the trick.

Diaster answered 13/10, 2020 at 8:9 Comment(1)
it work after delete the npm file from AppData and reinstall the npm install -g npx. Thank you so much.Let
A
0

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.

Andradite answered 10/9, 2021 at 20:8 Comment(0)
S
0

just update your latest npm or yarn package like that :

npm install --global yarn

Scarab answered 20/12, 2021 at 19:12 Comment(0)
E
0

try to update the node version to latest /curremt version , it works in my case

Electromyography answered 2/11, 2022 at 7:31 Comment(0)
P
0

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
Peppermint answered 10/1, 2023 at 15:37 Comment(0)
C
0

Install the latest LTS Node js version from here and then try command npx create-react-app myappname

Catchup answered 9/8, 2023 at 5:30 Comment(0)
S
0

try using npm -g install create-next-app worked for me .

Spew answered 27/9, 2024 at 23:14 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.