Current Behavior
The following error occurs:
error: unknown command 'run-android'
Warning: command "react-native run-android" exited with non-zero status code
### Expected Behavior
The app should launch successfully on an Android emulator or device.
### GitHub Repo
_No response_
### Steps to Reproduce
1.
### Steps to Reproduce
1. Create an Nx workspace with PNPM:
```sh
npx create-nx-workspace --pm pnpm
- Add a React Native app:
nx add @nx/react-native
nx g @nx/react-native:app apps/mobile-frontend
- Chose Vite as the bundler.
- Run
pod install on macOS.
- Fix potential
esbuild issues:
- I have added the
project.json file in the mobile-frontend directory as follows:
{
"name": "mobile-frontend",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/mobile-frontend/src",
"projectType": "application",
"tags": [],
"// targets": "to see all targets run: nx show project mobile --web",
"targets": {}
}
- Check project existence:
nx show project mobile-frontend
- Run the Android app:
nx run mobile-frontend:run-android
Nx Report
Nx logs show:
NX Ran target run-android for project mobile-frontend (772ms)
× 1/1 failed
√ 0/1 succeeded [0 read from cache]
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Additional Context
- Is
run-android the correct command for Nx-managed React Native apps?
- Do I need additional configurations for Vite?
Current Behavior
The following error occurs:
pod installon macOS.esbuildissues:project.jsonfile in themobile-frontenddirectory as follows:{ "name": "mobile-frontend", "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "apps/mobile-frontend/src", "projectType": "application", "tags": [], "// targets": "to see all targets run: nx show project mobile --web", "targets": {} }Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Additional Context
run-androidthe correct command for Nx-managed React Native apps?