I am getting this create react app error again and again even after doing the uninstall part.
npm uninstall -g create-react-app
up to date, audited 1 package in 570ms
found 0 vulnerabilities
npx create-react-app test-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/
C:>npm --version 8.3.0 C:>node --version v16.13.0
Can someone help me with this.
CodePudding user response:
Have you tried running:
npx clear-npx-cache
to clear your npx cache and then running the npx create-react-app your-app
command?
Also have a look at this answer on clearing cache.
Additionally, it might be worth trying to force the latest version with:
npx create-react-app@latest my-app --use-npm
CodePudding user response:
You will have to clear npx cache to make it work.
You can locate the location of the folder where create-react-app in installed using npm ls -g create-react-app
Also, to clear cache refer to this answer https://stackoverflow.com/a/66019858/5599770