Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

I am getting this create React app error again and again even after doing the uninstall part.

npm uninstall -g create-react-app

up to date, audited 1 package in 570ms

found 0 vulnerabilities

npx create-react-app test-app

Need to install the following packages: create-react-app Ok to proceed? (y) y

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.

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:\>npm --version
8.3.0
C:\>node --version
v16.13.0

How can I fix this?

over 4 years ago · Santiago Trujillo
13 answers
Answer question

0

You will have to clear the npx cache to make it work.

You can locate the location of the folder where create-react-app is installed using npm ls -g create-react-app.

Also, to clear the cache, refer to this answer in How can I clear the central cache for `npx`?

over 4 years ago · Santiago Trujillo Report

0

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

Also have a look at this answer on clearing the cache.

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

npx create-react-app@latest my-app --use-npm

over 4 years ago · Santiago Trujillo Report

0

(npx create-react-app@5.0.0 my-app) worked like a charm and its also much faster now then old react js

over 4 years ago · Santiago Trujillo Report

0

I followed the above suggestions but it didn't solve my problem. Below steeps solved my problem

1- Learn npm cache folder path:
npm cache verify
This gives you npm cache folder path: Cache verified and compressed (~\AppData\Local\npm-cache_cacache)

2- Go to"..\npm-cache" folder and delete everything

3- Cerate your project:
npx create-react-app my-app

over 4 years ago · Santiago Trujillo Report

0

I have resolved with the following steps:

  1. npm uninstall -g create-react-app

  2. npx clear-npx-cache

  3. npx create-react-app myapp

over 4 years ago · Santiago Trujillo Report

0

I tried both and they all works fine. You can try any of them.

npx create-react-app@5.0.0 my-app or npx clear-npx-cache

over 4 years ago · Santiago Trujillo Report

0

I got same issue and I fixed it by running the following commands:

npx clear-npx-cache
npm cache verify

Go to"..\npm-cache" folder that you get its path from previous command and delete everything

npm install -g npm@8.3.0
npx create-react-app your_app_name
over 4 years ago · Santiago Trujillo Report

0

I was having the same problem and no matter what I tried (i.e. clearing cache, uninstalling -g create-react-app, etc..) nothing worked.

I had to use:

$ npm uninstall -g create-react-app

and

$ npm uninstall create-react-app

and then I was able to use:

$ npx create-react-app my-app

I know it seems simple but this was the only thing that worked for me.

over 4 years ago · Santiago Trujillo Report

0

To clear a cache in npm, we need to run the npm cache clean --force command in our terminal:

npm cache clean --force
npx clear-npx-cache

clean: It deletes all data from your cache folder.

over 4 years ago · Santiago Trujillo Report

0

Solution 1: Force to the latest version

Just try to run the create command with force to the latest version. Just like this:

npx create-react-app@latest_version my-app --use-npm

And the latest version is 5.0.0 so just try this command:

npx create-react-app@5.0.0 my-app

Now, your error must be solved.

Solution 2: Clear the cache

You just need to clear your cache and then you can create a new React project. First of all, clear the cache by running this command:

npx clear-npx-cache

If it does not work, use this and try again: Delete everything from this path.

C:\Users\Your_user_name\AppData\Roaming\npm-cache

On macOS (and likely Linux), it’s ~/.npm/_npx. You can drop it with:

rm -rf ~/.npm/_npx

Or try the command npm cache clean --force using administrator mode in your terminal. Now, just rerun your create command.

npx create-react-app your-app

Solution 3: Run this command

Just run this command one by one.

  1. npm uninstall -g create-react-app
  2. npm cache clean --force
  3. npm cache verify
  4. npx create-react-app my-app
over 4 years ago · Santiago Trujillo Report

0

If you still receive the same error after trying the other answers solutions try the following:

Go to the path where npm install packages globally.

  • On macOS or Linux it's usually: /usr/local/lib/node_modules
  • On Windows: C:\Users\USER_NAME\AppData\Roaming\npm\node_modules

Search for create-react-app folder and delete it. You might need to delete create-react-app related files from parent folder:

  • /usr/local/lib/
  • C:\Users\USER_NAME\AppData\Roaming\npm\

You may also try the 'npm root -g' command to get the path, however, for me the returned path wasn't the correct one for some reason.

over 4 years ago · Santiago Trujillo Report

0

npx clear-npx-cache //CMD USED TO NORMALPROCEDURE TO GO

over 4 years ago · Santiago Trujillo Report

0

If you're using npm>5 and still getting this error. This might be you have installed old npm and then updated. Tried to clear the npm cache with the below command. It should work like charm.

npx clear-npx-cache
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!