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 npx create-react-app
.
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
- Conclusion
- ✅ The Best Way to stay Up-to-Date with my Content
The Problem
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.
Simply write
npx clear-npx-cache
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.
npx create-react-app@latest
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.
Conclusion
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.
✅ The Best Way to stay Up-to-Date with my Content
- Sign up for the Newsletter
- Bookmark my LinkTree
- Follow me on Twitter
- Subscribe to me on YouTube
- Join our Discord Server
- Become a Patron and join the Members Only Discord Channel
Thanks, just clear-up was needed !
Clearing cache worked. Cheers!
Amazing! YW!