react-native plugin run-android fail with default install (metro/babel)
See original GitHub issueWhen using the instructions with android the app is installed on the device but metro ultimately fails at some point with the default App.tsx that comes with the plugin.
Current Behavior
Metro fails to bundle the js/ts with the default nrwl react-native app
Expected Behavior
App should load as expected
Steps to Reproduce
npx create-nx-workspace happynrwl \
--preset=react-native \
--appName=mobile
nx run-android mobile
Failure Logs
Duplicate __self prop found. You are most likely using the deprecated transform-react-jsx-self Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.
(Neither of the above plugins seem to be in use)
Environment
- node 16
- npm 8
- MacOS M1
- Android Nexus 10
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Error: Couldn't find preset "module:metro-react-native-babel ...
When trying to run "react-native-git-upgrade" it gives the following error: git-upgrade ERR! An error occurred during upgrade: Error: Couldn't ...
Read more >BUILD FAILED: can't install the app when i run npm run android
Go to your babel.config and adding "plugins: ['react-native-reanimated/plugin']". Your babel.config.js file should look like this
Read more >Announcing React Native 0.70
We are excited to release a new version of React Native, 0.70.0. This version comes with several improvements like a new unified ...
Read more >Getting Started with FullStory React Native Capture
First, make sure your Android and iOS projects are properly configured with FullStory for Mobile Apps. This step can be skipped in an...
Read more >Getting Started · React Native Paper
Getting Started. Installation. Open a Terminal in your project's folder and run: yarn add react-native-paper. or npm install react-native-paper.
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
Even better, @xiongemi’s fix in 14.7.6 seems to work without my patch above. Thank you @xiongemi.
I can confirm too that @curthipster solution works. Test working properly as well.