capacitor: bug: @capacitor/android: 3.4.3 - ERR_SUBPROCESS_COMMAND_NOT_FOUND
Bug Report ERR_SUBPROCESS_COMMAND_NOT_FOUND
What command is it looking for? Perhaps the error should specify?
Capacitor Version
% npx cap doctor android
๐ Capacitor Doctor ๐
Latest Dependencies:
@capacitor/cli: 3.4.3
@capacitor/core: 3.4.3
@capacitor/android: 3.4.3
@capacitor/ios: 3.4.3
Installed Dependencies:
@capacitor/cli: 3.4.3
@capacitor/core: 3.4.3
@capacitor/android: 3.4.3
@capacitor/ios: 3.4.3
Platform(s)
@capacitor/android: 3.4.3
Current Behavior
% npx cap run android
โ Copying web assets from www to android/app/src/main/assets/public in 9.85ms
โ Creating capacitor.config.json in android/app/src/main/assets in 1.07ms
โ copy android in 16.39ms
โ Updating Android plugins in 1.16ms
[info] Found 3 Capacitor plugins for android:
@capacitor/camera@1.3.1
@capacitor/filesystem@1.1.0
@capacitor/geolocation@1.3.1
โ update android in 28.55ms
โ Running Gradle build - failed!
[error] ERR_SUBPROCESS_COMMAND_NOT_FOUND
Expected Behavior
Expect the app to run in the emulator
Code Reproduction
https://github.com/codeconsole/exiftest/tree/capacitor
Other Technical Details
npm --version
output:
8.5.5
node --version
output:
v17.8.0
pod --version
output (iOS issues only):
1.11.2
Additional Context
% cd android
% ./gradlew assembleDebug
BUILD SUCCESSFUL in 798ms
153 actionable tasks: 153 up-to-date
% npx ionic info
Ionic:
Ionic CLI : 6.19.0
Capacitor:
Capacitor CLI : 3.4.3
@capacitor/android : 3.4.3
@capacitor/core : 3.4.3
@capacitor/ios : 3.4.3
Utility:
cordova-res : not installed globally
native-run : 1.5.0
System:
NodeJS : v17.8.0 (/opt/homebrew/Cellar/node/17.8.0/bin/node)
npm : 8.5.5
OS : macOS Monterey
% sw_vers
ProductName: macOS
ProductVersion: 12.3
BuildVersion: 21E230
% sysctl -a | grep brand
machdep.cpu.brand_string: Apple M1 Pro
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 15 (2 by maintainers)
Should be fixed by a
brew update && brew upgrade libuv
There seems to be some weird bug on the nodejs installed from homebrew (not only 17, Iโve seen it on 16 and 14 too, 12 worked fine)
Iโve created a gist with a simplification of the code that is failing, and itโs nodejs spawn behaving differently on the homebrew node installs when running the gradle file, it calls the error function with ENOENT and the close function with -2 code, but the gradle execution finished correctly with
When using node from nvm/nodenv it doesnโt call the error function and the close is called with code 0
https://github.com/ionic-team/capacitor/issues/5545#issuecomment-1082035246
Worked for me