how to install the new version of react app 5.0.0
I've been trying to install a new app for my project. and I have an issue running it on my vs code. now, I was trying to uninstall from the global and its still output the same error. did some one ran into this error lately?
The ERROR output in the terminal:
"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/"
thanks ahead.
You can run this command to create new app with version 5.0.0
npx [email protected] my-app
or
run this command and clear npx cache
npx clear-npx-cache
then run this command to create react app
npx create-react-app my-app
npx create-react-app@latest my-app
thank you guys for your help. ive found the solution. i entered the following link: https://create-react-app.dev/docs/getting-started/
and then found this link inside that guide me through : https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f
and this is the solution:
If you use npm 5.1 or earlier, you can't use npx. Instead, install create-react-app globally:
npm install -g create-react-app Now you can run:
create-react-app my-app
thanks again for the contribute!