react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.4k stars 903 forks source link

Gradle Daemon stuck when using latest react native - upgrade from 64 to 75 #2508

Closed sahad00 closed 1 month ago

sahad00 commented 1 month ago

"resolutions": { "@react-native-community/cli": "^13.0.0", "@react-native-community/cli-config": "^13.0.0", "@react-native-community/cli-debugger-ui": "^13.0.0", "@react-native-community/cli-doctor": "^13.0.0", "@react-native-community/cli-platform-android": "^13.0.0", "@react-native-community/cli-platform-ios": "^13.0.0", "@react-native-community/cli-server-api": "^13.0.0", "@react-native-community/cli-tools": "^13.0.0", "@react-native-community/cli-types": "^13.0.0" },

if I don't add resolution to 13 , default is 14 compatible with react native 0.75 my metro bundler is stuck at 0% for so long once I added this resolution on one step downgrade the build is successful, what may be the reason ?

Screenshot 2024-09-17 at 4 48 01 PM
szymonrybczak commented 1 month ago

Did you try running Metro with --reset-cache?

sahad00 commented 1 month ago
Screenshot 2024-09-18 at 12 53 12 PM

Tried @szymonrybczak its stuck at 0% , tried for an hour no progress , If I downgrade works cool

szymonrybczak commented 1 month ago

hey, that's not a Metro bundler 😅 That's output from Gradle - to fix this scenario you can try running:

./gradlew clean && ./gradlew —stop

and once again run npx react-native run-android

sahad00 commented 1 month ago

@szymonrybczak I have tried this the ./gradlew clean itself is stuck

sahad00 commented 1 month ago

for someone who needs an answer ,

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

removing this solved this , this piece of code is not required on newer RN versions on settings.gradle