2

when trying to install react, it outputs an error:

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

We no longer support global installation of Create React App.

an attempt to reinstall node js on 16.15.0 or 18.1.0 failed. Also a solution from here "You are running create-react-app 4.0.3 which is behind the latest release (5.0.0)" it didn't help.What is the reason for this?

  • I'm having exactly the same issue. Tried the two suggested answers here so far but still getting the same error. After I run 'npm uninstall -g create-react-app' it just returns `up to date, audited 1 package in 165ms` in the terminal. – Smlok May 22 '22 at 00:50

3 Answers3

0

solution 1:clean your npm npx cache

solution 2 : npx create-react-app@5.0.0 my-app

0

i think you are using create-react-app as globle package.. you should try npm uninstall -g create-react-app and then try npx create-react-app myapp

  • Returns `up to date, audited 1 package in 165ms` after I run `npm uninstall -g create-react-app` and getting the same error. – Smlok May 22 '22 at 00:52
  • This is not the solution to this answer he is getting errors by running this code. Please suggest alternate answer. – Zohaib Amir Jan 07 '23 at 18:23
0

I have solved this problem by following steps:

  1. search where create-react-app is: $ whereis create-react-app;
  2. open the directory and delete create-react-app files;
  3. install packages again: npm install -g create-react-app
xiamo
  • 1