Build error after upgrading to RN 0.70.2
See original GitHub issueDescription
After upgrading to 0.70.2 I’m seeing the build error below
It looks like a path problem notice
/home/johnf/work/gladly/mobile/node_modules/react-native-reanimated/mobile/node_modules/react-native/package.json
has an extra mobile in it after react-native-reanimated
> Configure project :react-native-firebase_messaging
:react-native-firebase_messaging package.json found at /home/johnf/work/gladly/mobile/node_modules/@react-native-firebase/messaging/package.json
:react-native-firebase_app package.json found at /home/johnf/work/gladly/mobile/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_messaging:firebase.bom using default value: 30.5.0
:react-native-firebase_messaging package.json found at /home/johnf/work/gladly/mobile/node_modules/@react-native-firebase/messaging/package.json
:react-native-firebase_messaging:version set from package.json: 14.12.0 (14,12,0 - 14012000)
:react-native-firebase_messaging:android.compileSdk using custom value: 33
:react-native-firebase_messaging:android.targetSdk using custom value: 33
:react-native-firebase_messaging:android.minSdk using custom value: 23
:react-native-firebase_messaging:reactNativeAndroidDir /home/johnf/work/gladly/mobile/node_modules/react-native/android
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 executed
FAILURE: Build failed with an exception.
* Where:
Build file '/home/johnf/work/gladly/mobile/node_modules/react-native-reanimated/android/build.gradle' line: 135
* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> /home/johnf/work/gladly/mobile/node_modules/react-native-reanimated/mobile/node_modules/react-native/package.json (No such file or directory)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 -PreactNativeDebugArchitectures=x86_64 -PreactNativeArchitectures=x86_64
FAILURE: Build failed with an exception.
* Where:
Build file '/home/johnf/work/gladly/mobile/node_modules/react-native-reanimated/android/build.gradle' line: 135
* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> /home/johnf/work/gladly/mobile/node_modules/react-native-reanimated/mobile/node_modules/react-native/package.json (No such file or directory)
Steps to reproduce
- Upgrade to RN 0.70.2
- yarn android
Snack or a link to a repository
N/A
Reanimated version
3.0.0.rc2
React Native version
0.70.2
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:13 (4 by maintainers)
Top Results From Across the Web
"React Native version mismatch" errors - Expo Documentation
This can happen after upgrading your React Native or Expo SDK version, or when connecting to the wrong local development server.
Read more >A failure occurred while executing com.android.build.gradle ...
For me this worked (after reading Tony's link), my version of react was 0.66.0. Changed this file android\app\build.gradle
Read more >react-native - npm
Declarative. React makes it painless to create interactive UIs. · Component-Based. Build encapsulated components that manage their state, then ...
Read more >What's New in React Native 0.70 — How to Upgrade and Why ...
While it's been available for a while, it was originally an add-on that had to be installed and configured separately when building a...
Read more >Troubleshooting - React Native
If you run into issue where executing npm run android on macOS throws the above error, try to run sudo chmod +x android/gradlew...
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 Free
Top 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

This is fixed in 3.0.0-rc.4
Getting the same issue, also not using a monorepo