expo: [SDK 49][expo-updates][android] gradle plugin error on build when running on Windows
Minimal reproducible example
https://github.com/yerevin/expo-updates-node-issue
Summary
Hi,
After upgrade from Expo 48 to Expo 49 I ran into issue with expo-updates
gradle plugin, it throws below error related to attached line.
It is related to project with flavors as when I tried to reproduce it on simple bare-template it wasn’t an error, but after I added extra flavors it started to fail. (without multiple flavors gradle plugin doesn’t reach line with error).
I think it can be worth mention I’m on Windows 11.
Line causing error:
Error:
> Task :app:createDevelopmentDebugExpoManifest FAILED
'[node' is not recognized as an internal or external command,
operable program or batch file.
Off topic side note:
I think it can be worth to add multi flavor (Android) / bundle id (iOS) template to templates projects for beta testing as I think in last update from Expo 47 to Expo 48 also there was issue caught after SDK release related to projects with flavors and having multi flavor is quiet common thing. (I’m not adding it to be offensive in any way, just a tip)
Environment
expo-env-info 1.0.5 environment info: System: OS: Windows 10 10.0.22621 Binaries: Node: 16.20.0 - C:\Program Files\nodejs\node.EXE npm: 9.6.5 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: AI-222.4459.24.2221.9862592 npmPackages: expo: 49.0.0 => 49.0.0 react: 18.2.0 => 18.2.0 react-dom: 18.2.0 => 18.2.0 react-native: 0.72.1 => 0.72.1 Expo Workflow: bare
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 19 (4 by maintainers)
Patch fix for this issue (for
expo-update@0.18.8
)What worked for me was explicitly defining
entryFile
by uncommenting it inandroid/app/build.gradle
file and then replacing it with the path of the index file which has theregisterRootComponent
expo method.NOTE: make sure that the
android/app/build.gradle
is updated for react-native 0.72.4 as it should be wrapped by react configuration block. https://react-native-community.github.io/upgrade-helper/?from=0.71.13&to=0.72.4It looks like for me PR https://github.com/expo/expo/pull/23983 brought regression and I have to patch fix also line 92 Current patch fix for
expo-updates@0.18.12
which I used to successfully build local development build@weykon were you able to build successfully without patch fix on line 92 after upgrade to expo-update@0.18.12?
+1
even after installing expo-updates still getting same error. Tried this solution as well. Can anyone update on this?
It appears that this is fixed in https://github.com/expo/expo/pull/23983 .
@Kudo
Yes , sure, here it it
npx expo prebuild --clean
cd android
./gradlew clean
./gradlew assembleRelease --stacktrace --debug
These are the local commands I run to get the same error eas is triggering
@RicardoBrito1938 Can you paste the command you are running? It looks like issue is in command you are running than some build level error
Hey guys, i got build failed but it happened with this message
“> Task :app:createBundleReleaseJsAndAssets FAILED Unknown or unexpected option: --platform”