Cordova error: Using “requireCordovaModule” to load non-cordova module “q” is not supported

后端 未结 14 850
情深已故
情深已故 2020-12-08 12:59

I noticed that the builds on our CI started to fail because of the following error:

Discovered plugin \"cordova-plugin-app-version\" in config.xml. Adding it         


        
14条回答
  •  旧巷少年郎
    2020-12-08 13:24

    I also get this error after updating to 9.0.0. In my case I fixed it doing a clean up and rebuilding my app. You can try the following steps.

    First of all

    1. Update Cordova: npm install -g cordova
    2. Update SDK, ex: ./android/tools/bin/sdkmanager "build-tools;28.0.3" "platforms;android-28"
    3. Add SDK path to your system (1), ex: in bashrc export ANDROID_SDK_ROOT=~/android

    (1) ANDROID_HOME is deprecated but still working

    In your Cordova Project

    1. Remove node_modules, platforms and plugins folders
    2. Remove package.json and package-lock.json
    3. Remove from config.xml plugins/platforms/engine
    4. Add your platform, ex: cordova platform add android
    5. Add your plugins updated, ex: cordova plugin add cordova-plugin-whitelist
    6. Build: cordova build

    You can check a resume of your app with: cordova info

    If you want to see a list of your plugin you can use: cordova plugins ls

    Hope this help or at least point someone to the right direction :)

提交回复
热议问题