missing @babel/plugin-transform-react-jsx-self after run eject
See original GitHub issueIs this a bug report?
bug
Did you try recovering your dependencies?
i run yarn add @babel/plugin-transform-react-jsx-self -D
and fixed it
Environment
version 2.1.8
Steps to Reproduce
(Write your steps here:)
create-react-app test-rc --typescript
- yarn eject
- yarn start
Expected Behavior
no error
Actual Behavior
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Cannot find module '@babel/plugin-transform-react-jsx-source'
Add a file called babel.config.js to the root of your repository. Put this in the babel.config.js file ... After you execute npm run...
Read more >babel/plugin-transform-react-jsx-self
NOTE**: This plugin is included in `@babel/preset-react` ... npm install --save-dev @babel/plugin-transform-react-jsx-self.
Read more >Inside create-react-app - DataDrivenInvestor
To run your React application, you need to turn your JSX into plain JavaScript, that browser can understand. We need transpilers and bundlers...
Read more >Solving Babel issue in Ejected React Application - Medium
After ejecting from the React application, when you try to run the application locally you will get a JavaScript error saying that it...
Read more >@babel/plugin-transform-react-jsx | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. 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
Running to the same problem here. After struggling with the whole afternoon, I came out with something that may be useful?
npx create-react-app my-app --use-npm
works great after eject.npm pack
and test it with the react-script.tgz file, everything works great on my local create-react-app env.node_modules > babel-preset-react-app > node_modules > @babel
.It seems like after running
npx create-react-app my-app
, the node_modules hasbabel-preset-react-app
inside, and when runningyarn eject
, althoughreact-script
removed from package.json andbabel-preset-react-app
replaced it, Yarn didn’t resolvebabel-preset-react-app
again.I try to fix the broken one with
yarn remove babel-preset-react-app
andyarn add babel-preset-react-app
and it works. Maybe can add some script to clean up thebabel-preset-react-app
before or after yarn install, and it will be fixed.https://github.com/facebook/create-react-app/blob/e630238d0d5870aa0f20e487b12708935cf58737/packages/react-scripts/scripts/eject.js#L309-L312
Closing in favor of #6099