Fix the Error: "You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0). We no longer support global installation"
I ran into the error below a few days ago while trying to create a new react application;
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.
From my research, this error can be fixed in these 3 steps;
- First, remove any global installation with this command
npm uninstall -g create-react-app
- Then, clear your npx cache by executing
npx clear-npx-cache
- Finally, run the create-react-app(cra) command
To install react with typescript, follow the first two steps above and then execute the cra command with typescript template flagnpx create-react-app my-app
With all these in place, you should be able to create a new react application successfully.npx create-react-app client --template typescript