Out of a sudden I get an error during gradlew when building our app for android.
It seems, something goes wrong during step
Configure project :react-native-reanimated
Expo SDK 45
expo doctor shows no errors
- expo-application (4.1.0)
- expo-background-fetch (10.2.0)
- expo-battery (6.2.0)
- expo-constants (13.1.1)
- expo-device (4.2.0)
- expo-eas-client (0.2.1)
- expo-file-system (14.0.0)
- expo-font (10.1.0)
- expo-intent-launcher (10.2.0)
- expo-json-utils (0.3.0)
- expo-keep-awake (10.1.1)
- expo-localization (13.0.0)
- expo-manifests (0.3.1)
- expo-modules-core (0.9.2)
- expo-notifications (0.15.4)
- expo-screen-orientation (4.2.0)
- expo-secure-store (11.2.0)
- expo-splash-screen (0.15.1)
- expo-structured-headers (2.2.1)
- expo-task-manager (10.2.1)
- expo-updates (0.13.4)
- expo-web-browser (10.2.1)
- unimodules-app-loader (3.1.0)
- I prepared a bugfix build for our app without changing versions or usage of any expo or reactnative packages. The build of my bugfix build failed
Build Details — d44991b6-7e25-4e33-8de9-acae78e49b46 — mivao — Expo
After “Using expo modules …” there is this error message:
[stderr] FAILURE: Build failed with an exception. [stderr] * Where: [stderr] Build file '/home/expo/workingdir/build/packages/mobile/node_modules/react-native-reanimated/android/build.gradle' line: 216 [stderr] * What went wrong: [stderr] A problem occurred evaluating project ':react-native-reanimated'. [stderr] > /home/expo/workingdir/build/packages/mobile/node_modules/react-native/package.json (No such file or directory) [stderr] * Try: [stderr] > Run with --stacktrace option to get the stack trace. [stderr] > Run with --info or --debug option to get more log output. [stderr] > Run with --scan to get full insights. [stderr] * Get more help at https://help.gradle.org [stderr] BUILD FAILED in 2m 21s
- I checked the last successful build from Nov. 21.
Build Details — 6e6d6ad5-abf6-4eef-8408-88954e6d44ac — mivao — Expo
Comparing the logs from gradlew I see, the output for :react-native-reanimated should be like
> Configure project :react-native-reanimated AAR for react-native-reanimated has been found /home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-68-jsc.aar Checking the license for package Android SDK Build-Tools 30.0.2 in /home/expo/Android/Sdk/licenses License for package Android SDK Build-Tools 30.0.2 accepted. Preparing "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)". "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" ready. Installing Android SDK Build-Tools 30.0.2 in /home/expo/Android/Sdk/build-tools/30.0.2 ...
- I reverted my repo back to the commit that provided the last working build.
Result was the same error as in 1.
Build Details — 082251fc-749e-4fb7-8a2e-a061114fe65f — mivao — Expo
I just noted something in the error logs:
[stderr] A problem occurred evaluating project ':react-native-reanimated'. [stderr] > /home/expo/workingdir/build/packages/mobile/node_modules/react-native/package.json (No such file or directory)
It is true, there is no package.json at this place.
The project users yarn3 with
nmMode: hardlinks-local and
The react-native package lies in node_modules at the project root.
Do you have any idea what could cause this error?