Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

打release包时,提示 fatal error: 'hermes/hermes.h' file not found #29

@tza17313

Description

@tza17313

描述 / Description

react native 项目中, reanimated包版本如下:

"@react-native-oh-tpl/react-native-reanimated": "^3.6.4-rc.1",
"react-native-reanimated": "^3.6.0",

鸿蒙项目中相关的包版本如下:

 "@rnoh/react-native-openharmony": "file:../libs/react_native_openharmony_0.72.48_release.har",
 "@react-native-oh-tpl/react-native-reanimated": "file:E:/dev/huawei/mt-app-rnoh/node_modules/@react-native-oh-tpl/react-native-reanimated/harmony/reanimated.har",

错误日志如下:

[0/2] Re-checking globbed directories...
[1/139] Building CXX object reanimated/CMakeFiles/rnoh_reanimated.dir/E_/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/Tools/JSLogger.cpp.o
[2/139] Building CXX object reanimated/CMakeFiles/rnoh_reanimated.dir/E_/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp.o
FAILED: reanimated/CMakeFiles/rnoh_reanimated.dir/E_/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp.o 
C:\PROGRA~1\Huawei\DEVECO~1\sdk\default\OPENHA~1\native\llvm\bin\CLANG_~1.EXE --target=aarch64-linux-ohos --gcc-toolchain="C:/Program Files/Huawei/DevEco Studio/sdk/default/openharmony/native/llvm" --sysroot="C:/Program Files/Huawei/DevEco Studio/sdk/default/openharmony/native/sysroot" -DC_API_ARCH -DHERMES_ENABLE_DEBUGGER=1 -DJS_RUNTIME_HERMES=1 -DRCT_NEW_ARCH_ENABLED=1 -DREACT_NATIVE_MINOR_VERSION=72 -DREANIMATED_VERSION=3.6.0 -DWITH_HITRACE_SYSTRACE -Drnoh_reanimated_EXPORTS -I"C:/Program Files/Huawei/DevEco Studio/sdk/default/hms/native/sysroot/usr/include" -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/patches/react_native_core -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/folly -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon/react/nativemodule/core -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon/jsi -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon/callinvoker -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/utility/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/stacktrace/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/predef/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/array/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/throw_exception/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/config/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/core/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/preprocessor/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/double-conversion -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon/react/renderer/graphics/platform/cxx -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon/runtimeexecutor -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/glog/src -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/mpl/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/type_traits/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/rn/ReactCommon/yoga -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/intrusive/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/assert/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/move/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/static_assert/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/container_hash/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/describe/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/mp11/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/iterator/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/third-party/boost/libs/detail/include -IE:/dev/huawei/mtHarmony-release/entry/src/main/cpp/../../../oh_modules/@rnoh/react-native-openharmony/src/main/include/patches/react_native_core/react/renderer/textlayoutmanager/platform/harmony -IE:/dev/huawei/mtHarmony-release/entry/oh_modules/@react-native-oh-tpl/react-native-reanimated/src/main/cpp/patches/Tools -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/AnimatedSensor -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/Fabric -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/hidden_headers -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/LayoutAnimations -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/NativeModules -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/Registries -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/SharedItems -IE:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/Tools -IE:/dev/huawei/mtHarmony-release/entry/oh_modules/@react-native-oh-tpl/react-native-reanimated/src/main/cpp -fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie -DNDEBUG -O0 -g -fno-limit-debug-info  -std=gnu++17 -fPIC -Wno-unused-command-line-argument -DFOLLY_NO_CONFIG=1 -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -faligned-new -MD -MT reanimated/CMakeFiles/rnoh_reanimated.dir/E_/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp.o -MF reanimated\CMakeFiles\rnoh_reanimated.dir\E_\dev\huawei\mt-app-rnoh\node_modules\react-native-reanimated\Common\cpp\ReanimatedRuntime\ReanimatedRuntime.cpp.o.d -o reanimated/CMakeFiles/rnoh_reanimated.dir/E_/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp.o -c E:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp
In file included from E:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp:10:
E:/dev/huawei/mt-app-rnoh/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.h:27:10: fatal error: 'hermes/hermes.h' file not found
#include <hermes/hermes.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.

复现步骤 / Steps to reproduce

No response

库版本 / Library version

3.6.4-rc.1

React Native OpenHarmony version

0.72.48

构建类型 / Build type

Release app & production bundle

设备 / Device

Real device

设备版本 / Device model

nova14 pro 5.1.0

已悉知 / Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions