0

when I was trying to run create-react-app using the command npx create-react-app app I got the following Message

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

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/

I then tried to uninstall create-react-app globally using npm uninstall -g create-react-app and rerun npx command again i still get the same message that I should uninstall create-react-app globally even so the only module that is installed globally is npm on my machine

ahmed ali
  • 1
  • 1

3 Answers3

1

You first need to uninstall the globally installed create-react-app and then, invalidate the cache.

Command for the same: npm uninstall -g create-react-app && npm cache clean -f

Now, you may continue with creating the application again using: npx create-react-app application-name.

This question is similar to this one.

SNikhill
  • 446
  • 2
  • 8
0

Try npm cache clean –-force command after uninstalling create-react-app globally.

prathameshk73
  • 1,048
  • 1
  • 5
  • 16
0

Hopefully, the following code will work:

npx create-react-app@latest my-app

Issue(#10601): https://github.com/facebook/create-react-app/issues/10601

Anish
  • 1