./gradlew bundleRelease suddenly started to fail

Viewed 617

Description

'bundleRelease' fails for Android right after the bundler starts, in the step described bellow. I have tried to run this same process at older branches of my project that worked fine before, but even there the builds are now failing.

> Task :app:bundleProdReleaseJsAndAssets
warning: the transform cache was reset.
                 Welcome to React Native!
                Learn once, write anywhere

error src/app.js: function (prevType) {
Error: function (prevType) {
  this.state.exprAllowed = false;

  this.state.exprAllowed = false;
  if (prevType === types._let || prevType === types._c...<omitted>...

} could not be cloned. Run CLI with --verbose flag for more details.
  if (prevType === types._let || prevType === types._c...<omitted>...
} could not be cloned.
    at Object.serialize (node:v8:260:7)
    at _default (/.../node_modules/metro/node_modules/@babel/core/lib/transformation/util/clone-deep.js:16:30)
    at normalizeFile (/.../node_modules/metro/node_modules/@babel/core/lib/transformation/normalize-file.js:52:36)
    at normalizeFile.next (<anonymous>)
    at run (/.../node_modules/metro/node_modules/@babel/core/lib/transformation/index.js:31:50)
    at run.next (<anonymous>)
    at /.../node_modules/metro/node_modules/@babel/core/lib/transform-ast.js:20:41
    at Generator.next (<anonymous>)
    at evaluateSync (/.../node_modules/gensync/index.js:251:28)

> Task :app:bundleProdReleaseJsAndAssets FAILED

React Native version:

System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 1.21 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.11.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.6.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 29.0.2, 30.0.3
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_282 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. cd android && ./gradlew bundleRelease

Expected Results

The 'bundleRelease' works and generate the aab file.

0 Answers
Related