react-native icon indicating copy to clipboard operation
react-native copied to clipboard

rncli.h file not found | on Mac M1

Open AdhamMahmoud98 opened this issue 3 years ago • 1 comments

Description

enabled the new architecture after upgrading from 0.65.1 to 0.70.3 and I am trying to build the app and it always fails !!! Any idea what is the issue here ? The ini folder directory inside the build folder isn't generated at all. Task :app:buildCMakeDebug[arm64-v8a] C/C++: ninja: Entering directory `/Users/adham/MobileX/android/app/.cxx/Debug/66286b3x/arm64-v8a' C/C++: /Users/adham/MobileX/android/app/src/main/jni/MainApplicationModuleProvider.cpp:3:10: fatal error: 'rncli.h' file not found C/C++: /Users/adham/MobileX/android/app/src/main/jni/MainComponentsRegistry.cpp:7:10: fatal error: 'rncli.h' file not found

I tried to create a new project and the architecture is enabled it works on my machine.

Version

0.70.3

Output of npx react-native info

System: OS: macOS 12.6 CPU: (8) x64 Apple M1 Memory: 63.89 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.5.0 - /usr/local/bin/node Yarn: 1.22.19 - ~/MobileX/node_modules/.bin/yarn npm: 8.19.2 - /usr/local/bin/npm Watchman: 2022.07.04.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Not Found Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: /undefined - /usr/bin/xcodebuild Languages: Java: 11.0.11 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.3 => 0.70.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

cd android & ./gradlew clean

yarn android

Snack, code example, screenshot, or link to a repository

AdhamMahmoud98 avatar Nov 07 '22 11:11 AdhamMahmoud98

The rncli.h file is generated by the React Native CLI. It seems like the CLI is not running properly for you, most likely you missed something during the upgrade process.

Could you share a reproducer?

cortinico avatar Nov 07 '22 18:11 cortinico

@AdhamMahmoud98, how did you fix this? I have the same problem here by just trying to upgrade my 0.64 project to 0.70.x on ARM macOS.

Late edit: Solved the problem by removing problematic dependency: @react-native-community/cli-platform-android": "^7.0.1"

teodor-appd avatar Dec 19 '22 17:12 teodor-appd

:warning: Missing Reproducible Example
:information_source: It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

github-actions[bot] avatar Jan 19 '23 10:01 github-actions[bot]

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

github-actions[bot] avatar Feb 13 '23 02:02 github-actions[bot]

Could you share a reproducer?

Closing as the author is unresponsive

cortinico avatar Feb 13 '23 11:02 cortinico