create-react-app: npx create-react-app fails

Describe the bug

Command npx create-react-app my-app fails to complete

Environment

Environment Info:

  current version of create-react-app: 5.0.1
  running from C:\Users\------\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app

  System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 AMD Ryzen 5 2600X Six-Core Processor
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.13.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22000.120.0), Chromium (102.0.1245.41)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. Run npx create-react-app my-app

Expected behavior

A React app is created in a folder called my-app

Actual behavior

npm error about a package not being in the registry image

2022-06-30T19_41_18_042Z-debug-0.log

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 25
  • Comments: 33

Most upvoted comments

v4 still works. npx create-react-app --scripts-version 4.0.3

Seems to be a failed package publish…if someone needs an urgent workaround, then pin the dep in package.json

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

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

As per https://status.npmjs.org/incidents/6wr25yb0b2dd, this seems to be fixed. Time to close this issue?

In case you just want to use CRA for a test project or follow along a tutorial, here’s my hack. Make sure you’re using npm 8.3.x or higher:

  1. Create an empty package.json using npm init -y. It doesn’t matter much what’s in the fields.
  2. Add @florianbepunkt’s workaround to the aforementioned file, adding the corresponding "overrides": { "@types/eslint": "8.4.3" } entry.
  3. Run npm install -D create-react-app.
  4. Run npx create-react-app <your-app-name>.
  5. Work inside your-app-name or replace the contents in your base directory with the ones inside your-app-name.

time to use Vite probably…

Try this: npx create-react-app@latest appname

@rootfellen lets use Angular ahaha

will consider in future