babel-preset-react-app dependency error - Yarn 3
See original GitHub issueDescribe the bug
When attempting to use create-react-app with yarn 3, running the scripts returns the following error
Error: [BABEL] src/index.tsx: babel-preset-react-app tried to access @babel/plugin-proposal-private-property-in-object, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Did you try recovering your dependencies?
3.1.1
Which terms did you search for in User Guide?
N/A
Environment
current version of create-react-app: 4.0.3
running from /Users/mez/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app
System:
OS: macOS 12.1
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
Yarn: 3.1.1 - ~/.nvm/versions/node/v14.18.1/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v14.18.1/bin/npm
Browsers:
Chrome: Not Found
Edge: Not Found
Firefox: Not Found
Safari: 15.2
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
mkdir foo
cd foo
yarn set version berry
yarn create react-app . --template all
yarn start
Expected behavior
App would start
Actual behavior
Multitude of errors, including the above regarding issue with dependency (others are resolvable by adding the dependencies manually)
Reproducible demo
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:10 (2 by maintainers)
Top Results From Across the Web
@babel/preset-react | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >node.js - react-native - warnings setting up basic project
Just in case other people search this error again. For my case, I solve it by updating my yarn packages. npm install -g...
Read more >Create React App without Create React App - Bits and Pieces
Step by Step · 1. Make sure node is installed in your system · 2. Create project folder and package.json · 3. Install...
Read more >@babel/preset-react - npm
@babel/preset-react. 7.18.6 • Public • Published 6 months ago. Readme · Code Beta · 6 Dependencies · 7,374 Dependents · 57 Versions ...
Read more >Troubleshooting | React Navigation
I'm getting an error "Unable to resolve module" after updating to the ... npm install --save-dev metro-react-native-babel-preset ... If you use yarn :....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Add to your .yarnrc.yml:
#11751 seems like it will fix this.