Dear Developer,
I am trying to generate Android build for my application, which is using this plugin, using MABS 7.0. I am facing issues while generating the application. The error log is given below:
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] 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.
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] CordovaError: 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.
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] at Context.requireCordovaModule (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] at module.exports (/var/lib/builder/builds/74d674e1-b9bf-4cd4-a9d6-d7e3e02daf47/source/plugins/outsystems-plugin-disable-backup/hooks/disableAndroidBackup.js:74:17)
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] at runScriptViaModuleLoader (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:32)
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] at runScript (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:136:12)
[2021-01-25T05:48:15.200Z] [VERBOSE] [Build] at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:108:40
[2021-01-25T05:48:15.219Z] [ERROR] [Build] 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.
Request you to kindly do the needful and update the plugin code to make it compatible with the latest MABS 7
With best regards,
Shounak
Hi Dileep,
I found another component which does the same job and has been updated to support MABS 7.0 recently:
allowBackup Android Plugin - Overview | OutSystems
This one is working fine.
Regards,
Hi Shounak,
I think its something related to cordova version , cordova 9 is recently released, so either you need to open the plugin and downgrade cordova version to older or instead of using equireCordovaModule use require in plugin and zip and use it. hope you will be able to build new app.
For more details please check below url.
https://stackoverflow.com/questions/55304065/cordova-error-using-requirecordovamodule-to-load-non-cordova-module-q-is-no/58956882#58956882
Dileep Verma
Dear Dileep,
I tried downloading, modifying the code and zipping it to further use in my application. But I am still facing issues. Can you please help me by looking into it and try the same at your side?