title: React Native Error: Task :app:bundleDebugJsAndAssets FAILED when building APK
body: <p>I am trying to export my React Native Project to an APK file using:</p>
  <p>./gradlew assemble</p>
  <p>and receiving the following error:</p>
  <p>Task :app:bundleDebugJsAndAssets FAILED</p>
  <p>HERE are my warning outputs upon executing. Is there a dependency that might be depreciated? I can not seem to determine why I am not able to build the APK file I need.</p>
  <p>I am not sure if I need to downgrade my gradle for firebase compatibility.</p>
  <pre><code>Configure project :app
  useNewCruncher has been deprecated. It will be removed in a future version of the gradle plugin. New cruncher is now always enabled.
  
  &gt; Configure project :react-native-app-install-date
  Adding a Configuration as a dependency is a confusing behavior which isn't recommended. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. If you're interested in inheriting the dependencies from the Configuration you are adding, you should use Configuration#extendsFrom instead. See https://docs.gradle.org/6.7/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:extendsFrom(org.gradle.api.artifacts.Configuration[]) for more details.
  
  &gt; Configure project :react-native-firebase
  react-native-firebase: using React Native prebuilt binary from /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/react-native/android
  
  &gt; Configure project :react-native-firebase_app
  :react-native-firebase_app package.json found at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/@react-native-firebase/app/package.json
  :react-native-firebase_app:firebase.bom using default value: 28.0.1
  :react-native-firebase_app:play.play-services-auth using default value: 19.0.0
  :react-native-firebase_app package.json found at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/@react-native-firebase/app/package.json
  :react-native-firebase_app:version set from package.json: 12.0.0 (12,0,0 - 12000000)
  :react-native-firebase_app:android.compileSdk using custom value: 29
  :react-native-firebase_app:android.targetSdk using custom value: 29
  :react-native-firebase_app:android.minSdk using custom value: 21
  :react-native-firebase_app:reactNativeAndroidDir /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/react-native/android
  
  &gt; Configure project :react-native-firebase_auth
  :react-native-firebase_auth package.json found at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/@react-native-firebase/auth/package.json
  :react-native-firebase_app package.json found at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/@react-native-firebase/app/package.json
  :react-native-firebase_auth:firebase.bom using default value: 28.0.1
  :react-native-firebase_auth package.json found at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/@react-native-firebase/auth/package.json
  :react-native-firebase_auth:version set from package.json: 12.0.0 (12,0,0 - 12000000)
  :react-native-firebase_auth:android.compileSdk using custom value: 29
  :react-native-firebase_auth:android.targetSdk using custom value: 29
  :react-native-firebase_auth:android.minSdk using custom value: 21
  :react-native-firebase_auth:reactNativeAndroidDir /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/react-native/android
  
  &gt; Task :app:bundleDebugJsAndAssets
  warning: the transform cache was reset.
                      Welcome to Metro!
                Fast - Scalable - Integrated
  
  
  Error: While trying to resolve module `expo` from file `/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/index.js`, the package `/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/index.js`. Indeed, none of these files exist:
  
    * /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/index.js(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  error While trying to resolve module `expo` from file `/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/index.js`, the package `/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/index.js`. Indeed, none of these files exist:
    * /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/index.js/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
      at DependencyGraph.resolveDependency (/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/node-haste/DependencyGraph.js:436:17)
      at Object.resolve (/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/lib/transformHelpers.js:317:42)
      at resolve (/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:629:33)
      at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:645:26
      at Array.reduce (&lt;anonymous&gt;)
      at resolveDependencies (/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:644:33)
      at /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:329:33
      at Generator.next (&lt;anonymous&gt;)
      at asyncGeneratorStep (/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:24)
      at _next (/Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:159:9)
  
  info Run CLI with --verbose flag for more details.
    * /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/index.js(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    * /Users/mattlaszcz/Desktop/HearthNative_2/HearthNative_2/node_modules/expo/index.js/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx).
  </code></pre>
  <p>Dependencies:</p>
  <pre><code>buildscript {
      ext {
          buildToolsVersion = &quot;29.0.3&quot;
          minSdkVersion = 21
          compileSdkVersion = 29
          targetSdkVersion = 29
          ndkVersion = &quot;20.1.5948944&quot;
      }
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath(&quot;com.android.tools.build:gradle:4.1.0&quot;)
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  </code></pre>