appfeel / admob-google-cordova

AdMob ads Cordova/Phonegap/Intel XDK plugin for Android iPhone with latest SDK's
MIT License
132 stars 127 forks source link

Using "requireCordovaModule" to load non-cordova module "q" is not supported #109

Open ojimenez-aeropost opened 5 years ago

ojimenez-aeropost commented 5 years ago

Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it. cordova 9

rob-baker commented 5 years ago

I have the same issue. Is there a solution for this?

antalag commented 5 years ago

I found a solution for this, you have to change de "requireCordovaModule" method in script/100-prepare-admob-angular.js, there is 2 places to change, on line 7 and 61: change: var deferred = new context.requireCordovaModule('q').defer(); to var deferred = require('q').defer();

saYRam commented 4 years ago

i tried antalag method by editing script/100-prepare-admob-angular.js with Visual Studio Code. But still getting same err.

cordova 9, android 8

moblizeit commented 4 years ago

facing the same issue with cordova 9

snow-drop commented 4 years ago

Same here. I resolved mine by downgrading cordova from version 9.0.0 to 8.1.2. Hope this helps.

charlie-cao commented 4 years ago

the same issue. Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

    "cordova-admob": "^5.1.0",
    "cordova-android": "^8.1.0",
    "cordova-browser": "^6.0.0",
    "cordova-connectivity-monitor": "^1.2.2",
    "cordova-ios": "^5.1.1",
    "cordova-libgoogleadmobads": "git+https://github.com/appfeel/google-iosadmobads.git",
    "cordova-play-services-version-adapter": "^1.0.2",
    "cordova-plugin-androidx": "^1.0.2",
    "cordova-plugin-androidx-adapter": "^1.1.0",
    "cordova-plugin-contacts": "^3.0.1",
    "cordova-plugin-facebook4": "6.2.0",
    "cordova-plugin-firebasex": "^6.1.0",
    "cordova-plugin-inappbrowser": "^3.1.0",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-wkwebview-engine": "git+https://github.com/apache/cordova-plugin-wkwebview-engine.git#master",
    "cordova-plugin-x-socialsharing": "^5.6.0",
    "cordova.plugins.diagnostic": "^5.0.1",
    "es6-promise-plugin": "^4.2.2"
scottopolis commented 4 years ago

I am also seeing this issue. Did anyone find a solution without modifying the core code?

PixelKnight1398 commented 4 years ago

Having this issue as well. Would be nice if dev could respond considering they're taking a portion of the ad revenue ... >.> COME ON DEVS!

ankit257 commented 4 years ago

Search for string requireCordovaModule inside cordova-admob and cordova-play-services-version-adapter inside plugins folder. And replace ctx.requireCordovaModule('q').defer() or new context.requireCordovaModule('q').defer() with simply require('q').defer();