create-react-app
create-react-app copied to clipboard
Found: react@undefined when run npx create-react-app
Describe the bug
Found: react@undefined
node_modules/react
react@"*" from the root project
Could not resolve dependency:
peer react@"17.0.2" from [email protected]
node_modules/react-dom
react-dom@"*" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
Error when running with create-react-app.
I have tried on an exisiting project to install package @material-ui and received similiar result as above (Found react@undefined)
Did you try recovering your dependencies?
(Write your answer here.)
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from C:\Users\sienn\AppData\Roaming\npm\node_modules\create-react-app
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
Binaries:
Node: 16.3.0 - ~\AppData\Roaming\npm\node.CMD
Yarn: Not Found
npm: 7.18.1 - ~\AppData\Roaming\npm\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.18362.449.0)
Internet Explorer: 11.0.18362.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
- npx create-react-app my-app
Expected behavior
Successfully created React App
Actual behavior

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
I just had it now!
I'm also getting this error when trying to install react v18.2.2
In case this helps anyone, I had this issue as well. It turned out to be a problem with my local npm cache. Try this:
npm cache clean --force
Everything worked for me afterward.
npm cache docs: https://docs.npmjs.com/cli/v7/commands/npm-cache
From the docs for npm cache clean:
Delete all data out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues.
Well, sometimes it's necessary I guess. 🙂
Nope It's not working for me. I have tried following thing as well to clean up all cache stuff.
npm cache clean --force
npm config rm proxy
npm config rm https-proxy
npm cache verify
Still facing same issue. for reference adding ss.