5

PS E:\New folder> npx create-react-app my-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/

enter image description here

Dan Bonachea
  • 2,408
  • 5
  • 16
  • 31
santosh
  • 51
  • 1
  • 3
  • 1
    What is your actual question? – dunni Dec 19 '21 at 12:34
  • i'm not able to create a react appp – santosh Dec 19 '21 at 12:37
  • 1
    I had the same problem recently. What I did to break this cycle was to `npm uninstall -g create-react-app` and then install it (the latest version) globally again: `npm install -g create-react-app`. It works fine from global installation despite what it says. – tromgy Dec 19 '21 at 12:39

3 Answers3

26
npx clear-npx-cache

and then

 npx create-react-app your-app

It works for me

from:npx create-react-app prompting to globally uninstall non-existent create-react-app package?

Aaron Lee
  • 361
  • 2
  • 2
  • Worked in my case. Interesting fact: since the command deletes the cache it will also delete its own executable. – 6infinity8 Mar 03 '23 at 20:50
6

Step-1 npm uninstall -g create-react-app

Step-2 npm install -g create-react-app

It works for me if it still not works for you try npx clear-npx-cache after global uninstallation.

Mishra Vaibhav
  • 216
  • 3
  • 11
0

When I run npx clear-npx-cache i get:

TypeError: fs_1.rmSync is not a function

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 22 '22 at 15:35