"You are running create-react-app 4.0.3 which is behind the latest release (5.0.0)" [duplicate]
Asked Answered
B

6

250

I got an error while creating a React application. How do I fix it?

Enter image description here

Brandenbrandenburg answered 15/12, 2021 at 4:58 Comment(4)
Have you tried running the commands that it recommends? npm uninstall -g create-react-appRiarial
@BrandonDuffany Ya, I tried, But again shows the same error.Brandenbrandenburg
#70358974Edmee
when it prompts you to proceed, instead pressing enter, make sure to press 'y'Mastitis
B
185

It's fixed. I do npx [email protected] my-app.

Reference: Error while creating new React app ("You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0)")

Brandenbrandenburg answered 15/12, 2021 at 5:23 Comment(4)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Turnery
Do npx clear-npx-cache if you don't want to have to specify the cra version.Musset
I could solve this problem using npx create-react-app@latest my-appAldas
After clearing the cache for npm for almost 30 minutes to no avail. This worked for me. Sometimes you need to slow down and refocus. npx not npmNobukonoby
S
979

Try running this:

npx clear-npx-cache
Sibert answered 15/12, 2021 at 14:21 Comment(9)
This worked for me as well. I think this should be marked as the correct answer as it doesn't require forcing the latest version.Kaczmarek
This worked for me too. This issue happened even after a fresh install of node js. This fix worked like a charm. <3Textualist
I think we need to add more detail on why this workTemplin
This is the correct answer I tried to find more details. Based on the response from James L here: #63510825 create-react-app is still in npx cache memory even though it is not installed globally so clearing the npx cache using the command above solves it.Ingredient
this fixed my issue also, no idea why this is crashing. but thanksShuddering
If you don't want to download clear-npx-cache, run rm -rf ~/.npm/_npx insteadFluidize
This didn't work for me, running npm update npx and then npx create-react-app my-app workedSunderland
Got this! The system cannot find the path specified.Tetracycline
I've been stuck on this problem for hours. Thank you so much! Upvoted.Eichmann
B
185

It's fixed. I do npx [email protected] my-app.

Reference: Error while creating new React app ("You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0)")

Brandenbrandenburg answered 15/12, 2021 at 5:23 Comment(4)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Turnery
Do npx clear-npx-cache if you don't want to have to specify the cra version.Musset
I could solve this problem using npx create-react-app@latest my-appAldas
After clearing the cache for npm for almost 30 minutes to no avail. This worked for me. Sometimes you need to slow down and refocus. npx not npmNobukonoby
C
75

npx clear-npx-cache worked for me.

Try npx clear-npx-cache to clear your npx cache and then running the npx create-react-app your-app.

Additionally, it might be worth trying to force the latest version with:

npx create-react-app@latest my-app --use-npm
Cliff answered 15/12, 2021 at 12:56 Comment(0)
T
47

It's solved. By using this code:

npx [email protected] my-app

If it does not work, use this and try again:

Delete everything from C:\Users\your_pc_name\AppData\Roaming\npm-cache

This could be a local caching issue. Try the command npm cache clean --force using administrator mode in your terminal and then try again with the same command - npx create-react-app my-app.

Thud answered 15/12, 2021 at 8:4 Comment(0)
E
23

Follow this:

npm uninstall -g create-react-app

npm cache clean --force”

npm cache verify

npx create-react-app my-app

Ease answered 15/12, 2021 at 16:29 Comment(1)
this is the only thing that worked for me, thanks!Cesaro
M
3

You are running create-react-app 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

this works--npx [email protected] my-app

Myers answered 15/12, 2021 at 12:58 Comment(1)
npx clear-npx-cache it worked for me as wellRajasthan

© 2022 - 2024 — McMap. All rights reserved.