0

I installed latest version of node.js, react.js and next.js Everything worked properly but at the point I try to create my react project folder in the terminal by create-react-app my-app it tells me this:

You are running create-react-app 5.0.0, which is behind the latest release (5.0.1). We no longer support global installation of Create React App.

the problem began while I was already working on a project but one day when I did npm start I got an error I couldn't solve so I decided to create a new project and then that happened did any one got this lately ?

juliomalves
  • 42,130
  • 20
  • 150
  • 146
GadTheDad
  • 85
  • 1
  • 1
  • 6
  • If you installed `create-react-app` globally, remove it with `npm uninstall -g create-react-app`. Then you can run `npx create-react-app`. – ask4you Apr 19 '22 at 21:14
  • I already did this and it didn't uninstall the create-react-app module globally and i tried these commands `npm uninstall -g create-react-app` `npx clear-npx-cache` `npx create-react-app@latest my-app` and i tried to force the latest version it didn't do anything – GadTheDad Apr 19 '22 at 21:32

2 Answers2

2

Try to remove current version that you have locally and do it with latest version

npm uninstall -g create-react-app
npx clear-npx-cache
npx create-react-app@latest my-app
Evren
  • 4,147
  • 1
  • 9
  • 16
  • it worked but if when I ran the **`npm uninstall create-react-app`** because there was local installation the (-g) doesn't remove the local ,thank you tho – GadTheDad Apr 22 '22 at 11:28
0

Uninstall create-react-app and run npx create-react-app@latest instead. Then you'll use the latest version of create-react-app

Gøran Cantona
  • 611
  • 4
  • 5
  • I already did this and it didn't uninstall the create-react-app module globally and i tried these commands `npm uninstall -g create-react-app` `npx clear-npx-cache` `npx create-react-app@latest my-app` and i tried to force the latest version it didn't do anything – GadTheDad Apr 19 '22 at 21:36
  • 1
    Just in case, try npm uninstall create-react-app (not -g), in case there is a local install too. It's just a long shot, but could be worth a try? There might be some good suggestions here though: https://stackoverflow.com/questions/44962349/how-to-uninstall-global-package-with-npm?msclkid=853d08acc02e11ec828e676ca5e56839 – Gøran Cantona Apr 19 '22 at 22:21
  • what a long shot man, it did work when i ran **`npm uninstall create-react-app`** and then run **`npx create-react-app my-app`** the react project created successfully thank you so much for the information really appreciate it – GadTheDad Apr 20 '22 at 19:35