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.
> Task :app:hermesC FAILED
.../hermesc: Internal error: ... Compiling JS failed: ...
error: command failed with exit code 1Common 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
- Run a clean install so hermes-engine matches react-native.
- On iOS, run
pod installso the bundled Hermes matches. - Rebuild the release bundle.
npm ci
cd ios && pod installClear caches and rebuild the bundle
Drop stale Metro and Gradle outputs so Hermes compiles a fresh bundle.
npx react-native start --reset-cache
cd android && ./gradlew cleanHow 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.