DEV Community

Annysah
Annysah

Posted on • Originally published at annysah.hashnode.dev

Fix the Error:"You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

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
Enter fullscreen mode Exit fullscreen mode
  • Then, clear your npx cache by executing
npx clear-npx-cache
Enter fullscreen mode Exit fullscreen mode
  • Finally, run the create-react-app(cra) command
npx create-react-app my-app 
Enter fullscreen mode Exit fullscreen mode

In addition, to install with typescript, follow the first two steps and then execute the cra command with typescript template flag

npx create-react-app client --template typescript
Enter fullscreen mode Exit fullscreen mode

With all these in place, you should be able to create a new react application successfully.

Top comments (0)