Whenever I try to run npx create-react-app my-app, it shows the error:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz - Not found
npm ERR! 404 
npm ERR! 404  '@types/[email protected]://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz' is not in this registry.

When I try like eslint-8.4.0.tgz I can download it but 8.4.4 just doesn't exist.

Solution 1

There is an issue with v.8.4.4 on the NPM

Change your package.json and use 8.4.3 instead!

Pin it in "resolutions" for yarn

  "resolutions": {
    "@types/eslint": "8.4.3"
  }

or "overrides" for npm

  "overrides": {
    "@types/eslint": "8.4.3"
  }

more info about overriding values in NPM: How do I override nested NPM dependency versions?

more about issue (check it here):

Solution 2

It is not a problem of React, but a problem of a package @types/eslint. Seems like the bad version of the package was upgraded and it's not downloadable. To solve the issue, you may want to create a react app, without using create-react-app. To do this, try to use the following tutorial

Or you can wait until the package is fixed.