'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

C:\Users\lg\Desktop> npm uninstall -g create-react-app

up to date, audited 1 package in 216ms

found 0 vulnerabilities
C:\Users\lg\Desktop>npx clear-npx-cache
Need to install the following packages:
  clear-npx-cache
Ok to proceed? (y) y
C:\Users\lg\Desktop>npx [email protected] reduxapp
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

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.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

C:\Users\lg\Desktop>npm i tar

up to date, audited 153 packages in 1s

6 packages are looking for funding
  run `npm fund` for details

3 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
C:\Users\lg\Desktop>npx [email protected] reduxapp

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.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

I tried to solve it through Googling, but an error seems to occur, and the folder cannot be created.

enter image description here



Solution 1:[1]

try clearing npx-cache if you recently ran this on older version.

npx clear-npx-cache
npx install -g create-react-app react-app

Solution 2:[2]

So these are the steps I did to get it to work:

npm uninstall -g create-react-app

npx create-react-app@latest my-app-name

Solution 3:[3]

The below command worked for me,

npx create-react-app@latest my-app

Solution 4:[4]

clearing the npx cache solved the issue for me:

npx clear-npx-cache

Solution 5:[5]

Also what one can do is enter the console as administrator, located in the user's folder, and put this command (in my case I used the NPM one)

npm uninstall -g create-react-app

we uninstall it and then I reinstall it

npm install -g create-react-app

and voila, it worked for me

Solution 6:[6]

npx clear-npx-cache

npm install -g create-react-app

npx create-react-app@latest my-app

Solution 7:[7]

This is happening due to latest version release of create-react-app (5.0.1) all you need to do is first uninstall the previous version of create-react-app by run this command npm uninstall -g create-react-app or just update the previous version npm update -g create-react-app

Solution 8:[8]

To solve this issue run this code: npx [email protected] reduxapp Pay attention to installing the latest version of create-react-app otherwise, it is not working well.

Solution 9:[9]

This happens when you previously ran this on an older version.

Step 1: Try to clear cache by running its command: npx clear-npx-cache

Step 2: General command to create your app: npx install -g create-react-app react-app

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 Satya
Solution 2 ouflak
Solution 3 praba230890
Solution 4 howardButcher
Solution 5
Solution 6 veron
Solution 7 Kashif Ali
Solution 8 Mohammad Asif
Solution 9 Tapas Vashi