EAS Production Build Failing - Metro Bundler Error...
# community-support
s
EAS Production Build Failing - Metro Bundler Error (ExpoSDK 51, React Native 0.74.5) "Build failed: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information." Problem Summary Production and preview builds fail on EAS with Metro bundler error during Gradle's
:app:createBundleReleaseJsAndAssets
task. Development builds work perfectly. Local bundling (
npx expo export
) succeeds locally but fails on EAS. Environment • Expo SDK: 51.0.39 • React Native: 0.74.5 • EAS CLI: 16.27.0 (slightly outdated) • Build Profile: production & preview both fail • Platform: Android • Key Dependencies: •
@100mslive/react-native-hms@1.9.0
(video streaming) •
firebase@12.6.0
+
@firebase/webchannel-wrapper
expo-router@3.5.24
react-native-reanimated@3.10.1
Current Error
Copy code
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1
The Metro bundler section shows "JavaScript bundling error" but specific error details are not visible in the standard EAS build logs. What Works • Development builds (via
eas build --profile development
) - fully functional • Local bundling -
npx expo export --platform android
succeeds (1664 modules, 53s) • expo-doctor - all 16/16 checks pass • npx expo install --check - dependencies up to date What We've Tried 1. Firebase Fixes Initially had
Unable to resolve "@firebase/webchannel-wrapper/webchannel-blob"
error • Fixed by installing
@firebase/webchannel-wrapper
explicitly • Local bundling now works, but EAS still fails 2. Dependency Cleanup Removed unused packages (moment, lodash, duplicate OTP libraries) • Ran
expo-doctor
and
expo install --check
- all pass • Issue persists 3. Configuration Changes Added • .npmrc with
legacy-peer-deps=true
• Set npm config for legacy peer deps • Attempted to add 100ms plugin (not supported) • No improvement 4. Build Profile Changes • Tried both
production
and
preview
profiles • Both fail with same Metro bundler error • Development profile works perfectly Key Configuration Files eas.json (production profile):
Copy code
{
  "build": {
    "production": {
      "android": {
        "buildType": "apk"
      },
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}
app.json (relevant sections):
Copy code
{
  "expo": {
    "sdkVersion": "51.0.39",
    "plugins": [
      "expo-router",
      [
        "expo-font",
        {
          "fonts": [
            "./assets/fonts/TT-Octosquares-Medium.ttf"
          ]
        }
      ]
    ]
  }
}
Questions 1. Why does local bundling succeed but EAS fails? The same code bundles perfectly locally. 2. How to get detailed Metro bundler error logs from EAS? The current logs only show "JavaScript bundling error" without specifics. 3. Is there a known issue with
@100mslive/react-native-hms
+ EAS production builds?
R8 minification might be causing issues with this SDK. 4. Should we configure ProGuard rules for the 100ms SDK? If so, how in a managed Expo workflow? Repository Private project, but can share specific configuration files if helpful. Additional Context • Development builds work perfectly with all features functional (push notifications, video streaming, etc.) • The app uses Firebase for chat, 100ms SDK for video streaming, and Expo Router for navigation • Local development and testing environment: Windows + physical Android devices Any help or suggestions would be greatly appreciated!
v
Actually, most of what you wrote does note sound in any way Gradle-related, especially your concrete questions have nothing to do with Gradle and should probably be asked in a more appropriate community. I for example don't know anything about what expo or EAS is, besides that it is something some people use to build Android apps that somehow also uses Gradle in that process. So maybe you should at least move your question to #CJYS1DAP5 or maybe better ask in some Expo/EAS/whatever community. 🤷‍♂️ The only Gradle-relevant thing I see in your post is
Copy code
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1
And even that is not reaaaaly Gradle related. It just tells you that the
node
process you started exited with exit code 1 which signals an error. You probably got a more concrete error before those pasted lines.