Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ojimenez-aeropost opened this issue Sep 21, 2019 · 9 comments

Comments

@ojimenez-aeropost
Copy link

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
Copy link

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

@antalag
Copy link

antalag commented Nov 15, 2019

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
Copy link

saYRam commented Nov 25, 2019

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
Copy link

moblizeit commented Dec 6, 2019

facing the same issue with cordova 9

@snow-drop
Copy link

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

@charlie-cao
Copy link

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
Copy link

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

@PixelKnight1398
Copy link

PixelKnight1398 commented Feb 18, 2020

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
Copy link

ankit257 commented Mar 6, 2020

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants