You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone git@github.com:NickFitton/nx-react-native-android.git
cd nx-react-native-android
nx run-android mobile // This will work fine
cd apps/mobile
nx run-android // This will fail
> NX Running target run-android for project mobile and 2 tasks it depends on:
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> nx run mobile:ensure-symlink
> nx run mobile:sync-deps
info Dependencies for'mobile' are up to date! No changes made.
> nx run mobile:run-android
> NX ENOENT: no such file or directory, chmod 'apps/mobile/android/gradlew'
Error: ENOENT: no such file or directory, chmod 'apps/mobile/android/gradlew'
at chmodSync (node:fs:1991:3)
at chmodAndroidGradlewFiles ({path to repro}/reproduction/node_modules/@nx/react-native/src/utils/chmod-android-gradle-files.js:8:24)
at runAndroidExecutor ({path to repro}/reproduction/node_modules/@nx/react-native/src/executors/run-android/run-android.impl.js:11:63)
at runAndroidExecutor.next (<anonymous>)
at getLastValueFromAsyncIterableIterator ({path to repro}/reproduction/node_modules/nx/src/utils/async-iterator.js:13:27)
at iteratorToProcessStatusCode ({path to repro}/reproduction/node_modules/nx/src/command-line/run/run.js:41:94)
at {path to repro}/reproduction/node_modules/nx/src/command-line/run/run.js:155:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handleErrors ({path to repro}/reproduction/node_modules/nx/src/utils/params.js:9:16)
at async process.<anonymous> ({path to repro}/reproduction/node_modules/nx/bin/run-executor.js:59:28)
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Running target run-android for project mobile and 2 tasks it depends on failed
Failed tasks:
- mobile:run-android
Hint: run the command with --verbose for more details.
Package Manager Version
No response
Operating System
macOS
Linux
Windows
Other (Please specify)
Additional Information
Looking at the functionality of run-android.impl.ts, it runs chmod without being context aware of the current directory.
I believe making this function aware of the current directory it's in would help resolve this issue.
I only raise this as an issue as functionality differs between run-ios and run-android.
The text was updated successfully, but these errors were encountered:
@NickFitton i cloned your repo and i can run android. Did you run the command from the workspace root? i think it was trying to access apps/mobile/android/gradlew, which needs to run the command at workspace root.
Apologies, I wasn't specific enough in the initial description, when I said:
Running nx run-android from the project root causes a failure.
Running nx run-ios from the project root is successful.
I meant the root of the react native app (apps/mobile). My assumption was that you could run these functions from the app location due to being able to run nx run-ios from the same place.
Current Behavior
Running
nx run-android
from the project root causes a failure.Running
nx run-ios
from the project root is successful.Expected Behavior
No failure when running react native run android.
GitHub Repo
https://github.com/NickFitton/nx-react-native-android
Steps to Reproduce
(can also be done with a freshly generated app)
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Looking at the functionality of
run-android.impl.ts
, it runs chmod without being context aware of the current directory.I believe making this function aware of the current directory it's in would help resolve this issue.
I only raise this as an issue as functionality differs between
run-ios
andrun-android
.The text was updated successfully, but these errors were encountered: