I’m trying to run a build for a new React Native project through eas but getting the following errors:
[stderr] FAILURE: Build completed with 2 failures.
53[stderr] 1: Task failed with an exception.
54[stderr] -----------
55[stderr] * Where:
56[stderr] Build file '/home/expo/workingdir/build/node_modules/expo/android/build.gradle' line: 9
57[stderr] * What went wrong:
58[stderr] A problem occurred evaluating project ':expo'.
59[stderr] > Cannot invoke method multiply() on null object
60[stderr] * Try:
61[stderr] > Run with --stacktrace option to get the stack trace.
62[stderr] > Run with --info or --debug option to get more log output.
63[stderr] > Run with --scan to get full insights.
64[stderr] ==============================================================================
65[stderr] 2: Task failed with an exception.
66[stderr] -----------
67[stderr] * Where:
68[stderr] Build file '/home/expo/workingdir/build/node_modules/expo/android/build.gradle' line: 78
69[stderr] * What went wrong:
70[stderr] A problem occurred configuring project ':expo'.
71[stderr] > Could not get unknown property 'release' for SoftwareComponentInternal set of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
72[stderr] * Try:
73[stderr] > Run with --stacktrace option to get the stack trace.
74[stderr] > Run with --info or --debug option to get more log output.
75[stderr] > Run with --scan to get full insights.
76[stderr] ==============================================================================
77[stderr] * Get more help at https://help.gradle.org
78[stderr] BUILD FAILED in 2m 9s
eas-cli version: eas-cli@0.53.0
I have a monorepo with the app present in packages/app
If that doesn’t help, can you try creating a new app (not in a monorepo, to simply things a bit) and install your dependencies and try building it?
If that fails the same way, try figuring out which dependency/ies is/are causing the issue. Maybe post your dependencies and devDependencies here if you can reproduce the problem in a new app, but can’t track down the problematic dependencies.
I’m having this same problem. @wodin I read through those docs and have my monorepo set up correctly. This started happening when I upgraded from Expo 45 to Expo 46. Anyone have any pointers as to what might cause this issue?
expo doctor says everything is fine. the app runs fine locally in expo go.
Ok, actually I was in my mobile app directory when I ran npm why earlier. Just noticed that when I run it from the monorepo root directory I get this:
expo-modules-autolinking@0.8.1 dev
node_modules/@expo/prebuild-config/node_modules/expo-modules-autolinking
expo-modules-autolinking@"0.8.1" from @expo/prebuild-config@4.0.3
node_modules/@expo/prebuild-config
@expo/prebuild-config@"4.0.3" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
and for @expo-config-plugins:
@expo/config-plugins@4.1.5 dev
node_modules/expo-cli/node_modules/@expo/config-plugins
@expo/config-plugins@"4.1.5" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/config-plugins@"4.1.5" from @expo/config@6.0.24
node_modules/expo-cli/node_modules/@expo/config
@expo/config@"6.0.24" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/config-plugins@4.1.5 dev
node_modules/xdl/node_modules/@expo/config-plugins
@expo/config-plugins@"4.1.5" from xdl@59.2.55
node_modules/xdl
xdl@"59.2.55" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/config-plugins@"4.1.5" from @expo/config@6.0.24
node_modules/xdl/node_modules/@expo/config
@expo/config@"6.0.24" from xdl@59.2.55
node_modules/xdl
xdl@"59.2.55" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/config-plugins@4.1.5 dev
node_modules/@expo/dev-server/node_modules/@expo/config-plugins
@expo/config-plugins@"4.1.5" from @expo/config@6.0.24
node_modules/@expo/dev-server/node_modules/@expo/config
@expo/config@"6.0.24" from @expo/metro-config@0.3.18
node_modules/@expo/dev-server/node_modules/@expo/metro-config
@expo/metro-config@"0.3.18" from @expo/dev-server@0.1.115
node_modules/@expo/dev-server
@expo/dev-server@"0.1.115" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/dev-server@"0.1.115" from xdl@59.2.55
node_modules/xdl
xdl@"59.2.55" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/config-plugins@4.1.5 dev
node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins
@expo/config-plugins@"4.1.5" from @expo/prebuild-config@4.0.3
node_modules/@expo/prebuild-config
@expo/prebuild-config@"4.0.3" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
@expo/config-plugins@"4.1.5" from @expo/config@6.0.24
node_modules/@expo/prebuild-config/node_modules/@expo/config
@expo/config@"6.0.24" from @expo/prebuild-config@4.0.3
node_modules/@expo/prebuild-config
@expo/prebuild-config@"4.0.3" from expo-cli@6.0.8
node_modules/expo-cli
dev expo-cli@"^6.0.8" from mobile@2.0.0
mobile
mobile@2.0.0
node_modules/mobile
workspace mobile from the root project
hmmm… you shouldn’t have to install those manually. Some of your dependencies should have those as dependencies already, and that should be sufficient. What errors were you getting before you installed them?
I unfortunately don’t have any monorepos of my own, so am not sure what might be going wrong for you. I think it might be worth getting this working without a monorepo and then after that debugging the monorepo issues instead of trying to tackle non-monorepo build issues and monorepo build issues at the same time.
When I run it without manually adding those packages, I still get this failure when I run eas build -p android -e production. The iOS build works fine.
Running "expo doctor"
- Finding all copies of expo-modules-autolinking
[stderr] [12:50:47] Expected package expo-modules-autolinking@~0.10.1
[stderr] [12:50:47] Found invalid:
[stderr] [12:50:47] expo-modules-autolinking@0.8.1
[stderr] [12:50:47] (for more info, run: npm why expo-modules-autolinking)
- Finding all copies of @expo/config-plugins
[stderr] [12:50:53] Expected package @expo/config-plugins@^5.0.0
[stderr] [12:50:53] Found invalid:
[stderr] [12:50:53] @expo/config-plugins@4.1.5
[stderr] @expo/config-plugins@4.1.5
[stderr] @expo/config-plugins@4.1.5
[stderr] @expo/config-plugins@4.1.5
[stderr] [12:50:53] (for more info, run: npm why @expo/config-plugins)
- Finding all copies of @expo/prebuild-config
[stderr] [12:50:58] Expected package @expo/prebuild-config@^5.0.1
[stderr] [12:50:58] Found invalid:
[stderr] [12:50:58] @expo/prebuild-config@4.0.3
[stderr] [12:50:58] (for more info, run: npm why @expo/prebuild-config)
- Finding all copies of @unimodules/core
Command "expo doctor" failed.
bash exited with signal: SIGTERM
When I run “npx expo doctor” locally, it works fine:
$ npx expo doctor
🎉 Didn't find any issues with the project!
I kind of hijacked this topic with my own problem because it seemed related. To be more relevant, I’ve created a new topic here: EAS build failure for Android with Expo 46