I recently came across the error of "We no longer support global installation of Create React App" while trying to create a React App using
Gladly, there is an easy fix to the problem, look below.
Table of Contents
- The Problem
- Solution 1 - Clearing the Cache
- Solution 2 - Specifying Version Numbers
- ✅ The Best Way to stay Up-to-Date with my Content
Creating a new React App with
npx create-react-app throws the error "You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0)" and "We no longer support global installation of Create React App".
Solution 1 - Clearing the Cache
To quickly fix this issue for good, the best way is to clear the npx cache, so that in the future you can simply use
npx create-react-app again like you have been used to.
And confirm with y.
And now you are able to use
create-react-app again using the latest version.
Solution 2 - Specifying Version Numbers
An alternative solution is to specify a version number when creating the React app.
Code language: CSS (css)
This will install the latest version of React, but it will not solve the error if you run
npx create-react-app. That being said, I personally prefer Solution 1.
There is nothing much more to say on the matter. Use Solution 1 and your problem shall be solved.
You can also check out the React Documentation.
Good luck! If you feel lucky and you want to learn more about Web Development, check out our Web Development category.