CLI location Gradle file - Run Gradle outside of Javascript hierarchy always fail
cliResolveScript = "console.log(require('react-native/cli').bin);"
Hi,
I'm using the following module @react-native-community/cli-platform-android for react-native project. I'm trying to build my project with fastlane in Gitlab CI. However when it comes to run fastlane command, it always fails with this following error :
ReactNative:Unexpected empty result of running '[node, -e, console.log(require('react-native/cli').bin);]' command. :ReactNative:Running '[node, -e, console.log(require('react-native/cli').bin);]' command failed. FAILURE: Build failed with an exception.
- Where: Script '/builds/leested1/tablette-app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 195
- What went wrong: A problem occurred evaluating script. internal/modules/cjs/loader.js:883 throw err; ^Error: Cannot find module
In fact, I've seen this comment in the native_modules.gradle :
/** * Resolve the CLI location from Gradle file * * @todo: Sometimes Gradle can be called outside of the JavaScript hierarchy (-p flag) which * will fail to resolve the script and the dependencies. We should resolve this soon. * * @todo: fastlane has been reported to not work too. */
So, my question is when this issue will be fixed ? In the meantime, is there a way for me to workaround this issue ?
Thanks a lot for your answer.
Having the same issue. Gradle can be called outside of the JavaScript hierarchy. when can the script and the dependencies be resolve?
Updates on this issue? Breaks fastlane on monorepos
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.