You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0)

avatar

Borislav Hadzhiev

Last updated: Mar 14, 2022

banner

Photo from Unsplash

You are running 'create-react-app' 4.0.3, which is behind the latest release (5.0.0) #

To solve the React.js error "You are running create-react-app 4.0.3, which is behind the latest release (5.0.0)", run the npx clear-npx-cache command and re-run your app creation command, e.g. npx create-react-app my-app. The clear-npx-cache command will clear the cache for npx.

you are running create react app which is behind latest

Clear the cache for npx by running the following command.

shell
npx clear-npx-cache

Now you should be able to start a new create react app project by running one of the two following commands.

shell
# 👇️ for normal React.js project npx create-react-app my-app # 👇️ for TypeScript React.js project npx create-react-app my-app --template typescript

If the error is not resolved, you can force the command to use the latest version of create-react-app.

shell
# 👇️ for normal React.js project npx create-react-app@latest my-app # 👇️ for TypeScript React.js project npx create-react-app@latest my-app --template typescript

The commands above use the latest version of create-react-app to start a new project.

You can also scope the command down to a specific version of create-react-app.

shell
# 👇️ for normal React.js project npx create-react-app@5.0.0 my-app # 👇️ for TypeScript React.js project npx create-react-app@5.0.0 my-app --template typescript

The commands above show how you can create a new react project that uses version 5.0.0 of create-react-app.

If none of the commands above solve your issue, try to remove global installs of create-react-app by running one of the following commands.

shell
npm uninstall -g create-react-app yarn global remove create-react-app

Now, clear the cache for npx by running the following command.

shell
npx clear-npx-cache

And create your new project.

shell
# 👇️ for normal React.js project npx create-react-app my-app # 👇️ for TypeScript React.js project npx create-react-app my-app --template typescript

If none of the suggestions above work, try running the command with the --use-npm flag.

shell
# 👇️ for normal React.js project npx create-react-app@latest my-app --use-npm # 👇️ for TypeScript React.js project npx create-react-app@latest my-app --template typescript --use-npm

Conclusion #

To solve the React.js error "You are running create-react-app 4.0.3, which is behind the latest release (5.0.0)", run the npx clear-npx-cache command and re-run your app creation command, e.g. npx create-react-app my-app. The clear-npx-cache command will clear the cache for npx.

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.