npx create-react-app my-app
Need to install the following packages:
create-react-app
Ok to proceed? (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/
Asked
Active
Viewed 314 times
0

James Z
- 12,209
- 10
- 24
- 44
2 Answers
1
as it says in the error you need to remove the global installation of create-react-app, so run these two commands based on if you are using npm or yarn:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
after it's done open up the terminal in your directory again and use the npx command. it should do the trick.
npx create-react-app my-app

e.a.
- 919
- 4
- 9
-
Same error after removing react global installation – Rubal Kesar Dec 23 '21 at 01:46
-
I have reinstalled node JS but getting same error – Rubal Kesar Dec 23 '21 at 01:54
-
you don't need to remove react or node. just remove create-react-app. run the two commands I mentioned & then open another terminal and run npx command again. – e.a. Dec 23 '21 at 08:15
-
done but error is same – Rubal Kesar Dec 23 '21 at 18:06
-
Kindly help me with this error i am unable to complete my project – Rubal Kesar Dec 25 '21 at 17:20