I’m encountering an error while trying to build a React Native project on an ARM64 runner. The runner is in a pod, and the pod’s container is based on arm64v8/ubuntu:latest docker image.
The error message is:
OS not recognized. Please set project.react.hermesCommand to the path of a working Hermes compiler.
I tried logging into the pod and checking the Hermes binaries and found the following directory structure:
└── myapp/
└── node_modules/
└── react-native/
└── sdks/
└── hermesc/
├── linux64-bin/
├── osx-bin/
└── win64-bin/
When I tried executing the binaries in linux64-bin and even in osx-bin, they give an error. (I made sure I had the permission to execute)
Environment:
React Native version: 0.72.4
Running on: ARM64 runner
What I’ve tried:
I’ve successfully manually installed and built Hermes from source. The binaries exist in /opt/hermes/build/bin/:
ls /opt/hermes/build/bin hermesc hermes-lit
I’ve attempted to place the location of the hermesc in the gradle.properties file:
project.react.hermesCommand=/opt/hermes/build/bin/hermesc
However, I still get the same error when building.
Expected behavior:
The build should recognize the Hermes compiler and proceed without this error.
Questions:
Why isn’t the OS (ARM64) being recognized correctly?
How can I properly set project.react.hermesCommand for this environment?
Is there a compatibility issue between the Hermes binary and the ARM64 Android environment?
Any insights or suggestions on how to resolve this error would be greatly appreciated. Let me know if you need any additional information about my setup or build process
PS: I’m a DevOps engineer, not an android developer, so I may not be very aware of the Android technology.