Victor Mayowa
Victor Mayowa

Reputation: 473

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

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

Microsoft Windows [Version 10.0.19044.1586]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Olususi Victor>cd documents

C:\Users\Olususi Victor\Documents>cd react folder

C:\Users\Olususi Victor\Documents\React folder>npx create-react-app blog

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

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/


C:\Users\Olususi Victor\Documents\React folder>

Image of error

Upvotes: 37

Views: 33332

Answers (25)

Mahmoud EL sayed
Mahmoud EL sayed

Reputation: 1

you can use this command

npx [email protected] app-name

Upvotes: 0

Solomon Suraj
Solomon Suraj

Reputation: 1324

For me,

npm uninstall -g create-react-app

and

npx create-react-app@latest opus

enter image description here

Upvotes: 0

sagara
sagara

Reputation: 107

npx clear-npx-cache
npx create-react-app@latest app-name

Worked for me

Upvotes: 7

Elmehdi Aitbrahim
Elmehdi Aitbrahim

Reputation: 11

npm uninstall -g create-react-app

npx clear-npx-cache

Upvotes: 1

Shobi
Shobi

Reputation: 11

have you tried this

npm uninstall -g create-react-app

npx create-react-app@latest blog

Upvotes: 0

najwa
najwa

Reputation: 1

''' create-react-app projectName --template typescript '''

Upvotes: 0

Timilehin Adebambo
Timilehin Adebambo

Reputation: 21

Try this: npm uninstall -g create-react-app. Then open: C:\Users\Your_user_name\AppData\Roaming\npm-cache delete everything in the folders. Open: C:\Users\Your_user_name\AppData\Roaming\npm delete everything related to create-react-app.

Then finally: npx create-react-app my-project Worked for me. Good luck!

Upvotes: 2

Emre Can Erol
Emre Can Erol

Reputation: 31

Actually I updated my script, I uninstalled react global and reinstalled but nothing changed. But yarn still works. I am still trying to solve problem but for a while, I will use

yarn create react-app my-app

Upvotes: 1

Nill
Nill

Reputation: 147

I had the same problem, uninstalling create-react-app and installing the latest version solved the problem:

npm uninstall -g create-react-app
npx clear-npx-cache
npm cache clean --force
npm install -g create-react-app@latest

then you can create your react app with

npx create-react-app your-app-name

Upvotes: 6

Priti Puniya
Priti Puniya

Reputation: 11

  1. npm uninstall -g create-react-app
  2. npm install -g create-react-app
  3. npx clear-npx-cache
  4. npx create-react-app@latest my-react-app

...and u will be good to go. go ahead with command like cd my-react-app npm start

Upvotes: 1

pab
pab

Reputation: 11

Did you try with yarn? This works for me!

  1. yarn global remove create-react-app

  2. yarn create react-app my-app

Hope it works :)

Upvotes: 1

hoory Nikoo
hoory Nikoo

Reputation: 31

The solution that works for me:

  1. npm uninstall -g create-react-app
  2. yarn uninstall -g create-react-app
  3. npm i -g create-react-app

Upvotes: 2

Zeikha
Zeikha

Reputation: 11

I solved it with this:

  1. npm uninstall -g create-react-app
  2. npm install create-react-app@latest

Upvotes: 1

Ann0nip
Ann0nip

Reputation: 111

MacOs 12.3.1 - Node v16.3.0 - NPM 7.15.1

I tried a lot of possible solutions, but the only one that worked for me was to uninstall CRA globally AND locally.

So, you have to run:

npm uninstall -g create-react-app

npm uninstall create-react-app

npx clear-npx-cache

Upvotes: 10

pmkent
pmkent

Reputation: 1016

Run the following 3 commands sequentially:

npm uninstall -g create-react-app
npx clear-npx-cache
npm i create-react-app
npx create-react-app@latest my-app

Upvotes: 97

Alejandro De Castro
Alejandro De Castro

Reputation: 2257

if none of the answers worked for you, try adding this command after uninstalling the create-react-app package.

npm i create-react-app

Upvotes: 1

this worked for me.

npm uninstall -g create-react-app
npm uninstall create-react-app
npm cache clean --force
npm install create-react-app@latest

Upvotes: 1

blueeSpeed
blueeSpeed

Reputation: 11

I was able to solve mine by uninstalling Nodejs from my computer and then downloading the lastest one on my computer again.

Upvotes: 1

Oluwakemi
Oluwakemi

Reputation: 11

This worked for me

npm uninstall -g create-react-app
npx create-react-app@latest

Upvotes: 1

Chidozie
Chidozie

Reputation: 11

If anyone is still facing that problem after uninstalling it globally and cleaning the cache, try to run;

npm uninstall create-react-app

as you might have a non-global installation

Upvotes: 1

sandramsc
sandramsc

Reputation: 63

Had this issue today (running node v16.13.1). Exact error message read:

You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1). We no longer support global installation of Create React App. Please remove any global installs with one of the following commands:

- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here: https://create-react-app.dev/docs/getting-started/

Solution that worked:

 1. npm uninstall -g create-react-app
 2. npm install -g create-react-app
 3. npm cache clean -f
 4. npx create-react-app my-app

Upvotes: 2

oriel h
oriel h

Reputation: 21

This worked for me

npm uninstall -g create-react-app
npm i create-react-app
npx create-react-app my-app

still not sure what happened thou

Upvotes: 2

ZiauddinZiya07
ZiauddinZiya07

Reputation: 101

I also encountered in this problem, I solved my issue by clearing the cache!

npm cache clean --force

Upvotes: 1

Pierre Loti
Pierre Loti

Reputation: 134

I also encountered this problem and by installing the package with yarn, everything works! Even removing then reinstalling with npm, it didn't work. Here is my solution

yarn add create-react-app
create-react-app {app_name}

Upvotes: 1

Het Delwadiya
Het Delwadiya

Reputation: 119

Have you installed react globally? if yes, then remove it using

npm uninstall -g create-react-app

and then run your

npx create-react-app blog

if still you face the same issue than try creating a blog folder and inside that folder, run

npx create-react-app .

may be it will fix your issue.

Upvotes: 2

Related Questions