Skip to content
Latchkey

React Native Hermes "Internal error" / hermesc failed in CI

When Hermes is enabled, the release build runs hermesc to compile the JS bundle to bytecode. A hermesc failure or "Internal error" stops the build; it usually traces to a Hermes version that does not match React Native, or input the compiler rejects.

What this error means

The Android or iOS release build fails during the Hermes step with "hermesc: ... Internal error" or "Compiling JS failed", referencing the bundle.

Hermes
> Task :app:hermesC FAILED
.../hermesc: Internal error: ... Compiling JS failed: ...
error: command failed with exit code 1

Common causes

A Hermes / React Native version mismatch

A hermes-engine version not matched to the installed React Native produces a compiler error.

Bundle input Hermes cannot compile

Generated or transformed JS that Hermes does not accept (or a corrupt intermediate bundle) fails compilation.

How to fix it

Align Hermes with React Native and reinstall

  1. Run a clean install so hermes-engine matches react-native.
  2. On iOS, run pod install so the bundled Hermes matches.
  3. Rebuild the release bundle.
Terminal
npm ci
cd ios && pod install

Clear caches and rebuild the bundle

Drop stale Metro and Gradle outputs so Hermes compiles a fresh bundle.

Terminal
npx react-native start --reset-cache
cd android && ./gradlew clean

How to prevent it

  • Keep hermes-engine matched to your react-native version.
  • Reset Metro cache when bundle generation behaves oddly.
  • Test release (Hermes) builds in CI, not just debug.

Frequently asked questions

What causes ""hermesc ... Internal error""?
A hermes-engine version not matched to the installed React Native produces a compiler error.
How do I fix "hermesc ... Internal error"?
Align Hermes with React Native and reinstall

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card