'why does it give this error when I run create-react-app

whenever i run create-react-app command it shows this thing.enter image description here

It was running fine earlier but it isn't working now



Solution 1:[1]

Did you try to uninstall any installs of React that you may have mistakenly installed globally? Try the commands that appear inside the warning message: npm uninstall -g create-react-app or for yarn: yarn global remove create-react-app.

After that you may use create-react-app, this time locally.

Solution 2:[2]

You can check if you've create-react-app installed globally using the following command:

  • npm list -g --depth=0

  • yarn list global

If you see create-react-app in the list returned from the above command (which you probably would), just uninstall it using the command below and then the command should work properly.

  • npm uninstall -g create-react-app

  • yarn global remove create-react-app

Solution 3:[3]

As 'create-react-app' is updated to version 5.0.1 So you need to update your 'create-react-app' also to work properly.

Firstly Uninstall 'create-react-app' Globally using below command

npm uninstall -g create-react-app

Then again Globally install it using below command . It will update your 'create-react-app' to latest version

npm install -g create-react-app

Then you should able to create your react app properly. ?

Good luck ?. ?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alon Barenboim
Solution 2 Anonymous Panda
Solution 3 Maksud