Ionic cap <command> not working - no errors

I’ve created an ionic/angular app with capacitor. However, none of the ionic commands associated with capacitor are functioning. There are no errors associated with the commands entry. It seems to think it executed properly and jumps to new prompt with no result.

That said, running ‘npx’ instead of ‘ionic’ in front of capacitor commands works fine. So, the following commands function fine when ‘ionic’ is replaced with ‘npx’. This seems to be fine except I can’t get the live-reload functionality. Not sure if that is an associated issue or not.

Example commands are

ionic cap add android
ionic capacitor add android

similar results with ios.

I’ve enabled ionic integrations with capacitor:

places-app git:(master) ✗ ionic integrations enable capacitor
[INFO] Integration capacitor already enabled.

And I’ve added the following npm packages to the project:

    "@capacitor/ios": "^4.3.0",
    "@capacitor/android": "^4.3.0",

Any assistance is appreciated.

It’s a known issue, see Capacitor run android not working in 6.20.2 · Issue #4912 · ionic-team/ionic-cli · GitHub.
You can downgrade to 6.20.1 until it’s fixed.

3 Likes

Oh my god, you saved my head, I’m experiencing the exact same issue and was almost becoming mad, if not already. Thank you !

1 Like