Unable to find node_modules/@capacitor/android/capacitor



  • I’m trying to build a capacitor app for Android and get the following error when running quasar dev -m capacitor -T android:
    “Unable to find node_modules/@capacitor/android/capacitor. Are you sure @capacitor/android is installed? This file is currently required for Capacitor to function.”

    I was able to successfully develop an iOS app with capacitor. When I look in the src-capicitor/node_modules/@capacitor folder, I see a subfolder for ios but not android.

    I’ve googled solutions but can’t find any reports of the same problem.
    Steps:
    Created a new Quasar vue project
    ran quasar mode add capacitor
    ran quasar dev -m capacitor -T android

    I decided to try capacitor b/c I can’t get cordova to build with Android either after spending 2 days trying to resolve one problem after another.

    Really need to get this working so any help would be greatly appreciated.



  • I’ve resolved the problem but it seems this is a Quasar build problem.

    It seems the first you run “quasar dev -m capacitor -T …” for ios or android it adds capacitor for that platform correctly but when you run it for the second platform (i.e. android if you created ios first) it doesn’t add all of the subdirectories for capacitor.

    I resolved by removing the android folder in the src-capacitor then running “npx add capacitor android”.



  • @jrhopkins83 maybe file a bug report as well, although the specific way as you did, is the normal way to add platform per capacitor guide.


Log in to reply