-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
It looks like RN 0.84 RC versions fail to build from source on Android with steps from https://reactnative.dev/contributing/how-to-build-from-source#update-your-project-to-build-from-source with the error: Could not find a package configuration file provided by "hermes-engine" from react-native/ReactAndroid/src/main/jni/CMakeLists.txt:51. The problem can be reproduced with an empty app generated by the CLI (GH link attached in the issue; the only thing I changed is settings.gradle). I tried every RC version and none worked. On 0.83 it build successfully.
The full error can be seen in the Logs section.
I also tried adding hermesV1Enabled=false, the error remains.
Steps to reproduce
npx @react-native-community/cli@latest init --version 0.84.0-rc.2 FromSourceTestcd FromSourceTest/android- Modify
settings.gradleaccording to https://reactnative.dev/contributing/how-to-build-from-source#update-your-project-to-build-from-source - Run
./gradlew build - build fails
React Native Version
0.84.0-rc.2
Affected Platforms
Build - MacOS
Output of npx @react-native-community/cli info
System:
OS: macOS 26.0
CPU: (8) arm64 Apple M1 Pro
Memory: 134.33 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 24.4.0
path: /Users/kmichalik/.nvm/versions/node/v24.4.0/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 11.4.2
path: /Users/kmichalik/.nvm/versions/node/v24.4.0/bin/npm
Watchman:
version: 2025.07.14.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/kmichalik/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.2
- iOS 26.2
- macOS 26.2
- tvOS 26.2
- visionOS 26.2
- watchOS 26.2
Android SDK:
API Levels:
- "31"
- "33"
- "34"
- "35"
- "36"
Build Tools:
- 30.0.3
- 31.0.0
- 34.0.0
- 35.0.0
- 35.0.1
- 36.0.0
- 36.1.0
System Images:
- android-33 | Google Play ARM 64 v8a
- android-35 | Google Play Tablet ARM 64 v8a
- android-36 | Google APIs ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2512.13840223
Xcode:
version: 26.2/17C52
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /Users/kmichalik/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.1.0
wanted: 20.1.0
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.84.0-rc.2
wanted: 0.84.0-rc.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false
Stacktrace or Logs
Execution failed for task ':react-native:packages:react-native:ReactAndroid:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using /Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists.txt: -- The C compiler identification is Clang 18.0.2
-- The CXX compiler identification is Clang 18.0.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LTO support is enabled
-- Configuring incomplete, errors occurred!
C++ build system [configure] failed while executing:
/Users/kmichalik/Library/Android/sdk/cmake/3.30.5/bin/cmake \
-H/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/src/main/jni \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_SYSTEM_VERSION=24 \
-DANDROID_PLATFORM=android-24 \
-DANDROID_ABI=arm64-v8a \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-DANDROID_NDK=/Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006 \
-DCMAKE_ANDROID_NDK=/Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006 \
-DCMAKE_TOOLCHAIN_FILE=/Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006/build/cmake/android.toolchain.cmake \
-DCMAKE_MAKE_PROGRAM=/Users/kmichalik/Library/Android/sdk/cmake/3.30.5/bin/ninja \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/build/intermediates/cxx/Debug/e5ls4d19/obj/arm64-v8a \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/build/intermediates/cxx/Debug/e5ls4d19/obj/arm64-v8a \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_FIND_ROOT_PATH=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/.cxx/Debug/e5ls4d19/prefab/arm64-v8a/prefab \
-B/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/.cxx/Debug/e5ls4d19/arm64-v8a \
-GNinja \
-DREACT_COMMON_DIR=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactCommon \
-DREACT_ANDROID_DIR=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid \
-DREACT_BUILD_DIR=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/build \
-DANDROID_STL=c++_shared \
-DANDROID_TOOLCHAIN=clang \
-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON \
-DCMAKE_POLICY_DEFAULT_CMP0069=NEW \
-DHERMES_V1_ENABLED=1
from /Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid
CMake Error at CMakeLists.txt:51 (find_package):
Could not find a package configuration file provided by "hermes-engine"
with any of the following names:
hermes-engineConfig.cmake
hermes-engine-config.cmake
Add the installation prefix of "hermes-engine" to CMAKE_PREFIX_PATH or set
"hermes-engine_DIR" to a directory containing one of the above files. If
"hermes-engine" provides a separate development package or SDK, be sure it
has been installed. : com.android.ide.common.process.ProcessException: -- The C compiler identification is Clang 18.0.2
-- The CXX compiler identification is Clang 18.0.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LTO support is enabled
-- Configuring incomplete, errors occurred!
C++ build system [configure] failed while executing:
/Users/kmichalik/Library/Android/sdk/cmake/3.30.5/bin/cmake \
-H/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/src/main/jni \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_SYSTEM_VERSION=24 \
-DANDROID_PLATFORM=android-24 \
-DANDROID_ABI=arm64-v8a \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-DANDROID_NDK=/Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006 \
-DCMAKE_ANDROID_NDK=/Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006 \
-DCMAKE_TOOLCHAIN_FILE=/Users/kmichalik/Library/Android/sdk/ndk/27.1.12297006/build/cmake/android.toolchain.cmake \
-DCMAKE_MAKE_PROGRAM=/Users/kmichalik/Library/Android/sdk/cmake/3.30.5/bin/ninja \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/build/intermediates/cxx/Debug/e5ls4d19/obj/arm64-v8a \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/build/intermediates/cxx/Debug/e5ls4d19/obj/arm64-v8a \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_FIND_ROOT_PATH=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/.cxx/Debug/e5ls4d19/prefab/arm64-v8a/prefab \
-B/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/.cxx/Debug/e5ls4d19/arm64-v8a \
-GNinja \
-DREACT_COMMON_DIR=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactCommon \
-DREACT_ANDROID_DIR=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid \
-DREACT_BUILD_DIR=/Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid/build \
-DANDROID_STL=c++_shared \
-DANDROID_TOOLCHAIN=clang \
-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON \
-DCMAKE_POLICY_DEFAULT_CMP0069=NEW \
-DHERMES_V1_ENABLED=1
from /Users/kmichalik/GitRepos/FromSourceTest/node_modules/react-native/ReactAndroid
CMake Error at CMakeLists.txt:51 (find_package):
Could not find a package configuration file provided by "hermes-engine"
with any of the following names:
hermes-engineConfig.cmake
hermes-engine-config.cmake
Add the installation prefix of "hermes-engine" to CMAKE_PREFIX_PATH or set
"hermes-engine_DIR" to a directory containing one of the above files. If
"hermes-engine" provides a separate development package or SDK, be sure it
has been installed.
MANDATORY Reproducer
https://github.com/kmichalikk/rn-from-source-084
Screenshots and Videos
No response