12
Views
1
Comments
[Disable Android AllowBackup] Incompatible with MABS 7.0 (Using "requireCordovaModule")
Question
Forge component by Pradeep KK
2
Published on 23 Oct 2019
Application Type
Mobile

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

mvp_badge
MVP
Rank: #2

Note that the above is described in the MABS 7.0 releasenotes here:

"Using context.requireCordovaModule to load non-cordova modules is not supported anymore. (...) Replace context.requireCordovaModule with require and define the dependencies on package.json."