From 0f6e6263636e9cc8213a18c90e094703b3b62995 Mon Sep 17 00:00:00 2001 From: Alejandro Paredes Alva Date: Mon, 10 Jan 2022 15:34:34 +0100 Subject: [PATCH 1/2] Use React-native-community cli --- packages/platform-android/native_modules.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/platform-android/native_modules.gradle b/packages/platform-android/native_modules.gradle index a058d7507..642c2c60c 100644 --- a/packages/platform-android/native_modules.gradle +++ b/packages/platform-android/native_modules.gradle @@ -236,7 +236,7 @@ class ReactNativeModules { * * @todo: `fastlane` has been reported to not work too. */ - def cliResolveScript = "console.log(require('react-native/cli').bin);" + def cliResolveScript = "console.log(require('@react-native-community/cli').bin);" String[] nodeCommand = ["node", "-e", cliResolveScript] def cliPath = this.getCommandOutput(nodeCommand, this.root) From 7738db8a0eca732e18977d36e315f3bd493a36ef Mon Sep 17 00:00:00 2001 From: Alejandro Paredes Alva Date: Mon, 10 Jan 2022 15:36:43 +0100 Subject: [PATCH 2/2] match ios --- packages/platform-android/native_modules.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/platform-android/native_modules.gradle b/packages/platform-android/native_modules.gradle index 642c2c60c..20c858ba5 100644 --- a/packages/platform-android/native_modules.gradle +++ b/packages/platform-android/native_modules.gradle @@ -236,7 +236,7 @@ class ReactNativeModules { * * @todo: `fastlane` has been reported to not work too. */ - def cliResolveScript = "console.log(require('@react-native-community/cli').bin);" + def cliResolveScript = "try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}" String[] nodeCommand = ["node", "-e", cliResolveScript] def cliPath = this.getCommandOutput(nodeCommand, this.root)