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
- 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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 25
- Comments: 33
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
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:
package.json
usingnpm init -y
. It doesn’t matter much what’s in the fields."overrides": { "@types/eslint": "8.4.3" }
entry.npm install -D create-react-app
.npx create-react-app <your-app-name>
.your-app-name
or replace the contents in your base directory with the ones insideyour-app-name
.time to use Vite probably…
Try this: npx create-react-app@latest appname
will consider in future