I got an error while creating a React application. How do I fix it?
Microsoft Windows [Version 10.0.19044.1586]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Olususi Victor>cd documents
C:\Users\Olususi Victor\Documents>cd react folder
C:\Users\Olususi Victor\Documents\React folder>npx create-react-app blog
You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1).
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:\Users\Olususi Victor\Documents\React folder>
Image of error
Run the following 3 commands sequentially:
npm uninstall -g create-react-app
npx clear-npx-cache
npm i create-react-app
npx create-react-app@latest my-app
I tried a lot of possible solutions, but the only one that worked for me was to uninstall CRA globally AND locally.
So, you have to run:
npm uninstall -g create-react-app
npm uninstall create-react-app
npx clear-npx-cache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With