React deprecated the global installation of create-react-app. Now you don’t even need to install create-react-app
. Use npx to always get the latest version of create-react-app
.
Solution with Code Example
First, uninstall the previous version of create-react-app
which you installed globally –
npm uninstall -g create-react-app
Or, if you used yarn then –
yarn global remove create-react-app
Note: If you are not sure which package manager you used while installing create-react-app
, then run both of the commands. There will not be any side effects.
Second, create your project using npx
–
npx create-react-app project_name cd project_name npm start
Now you won’t get the warning, “You are running create-react-app, which is behind the latest release. We no longer support global installation of Create React App“.