When I build cordova this message view:
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.
How fix this problem?
PS. I updated npm before this build problem. So it was not problem buildings before update. Sorry my English))
The following fixed the issue for me
ionic cordova platform rm ios
ionic cordova plugin remove de.appplant.cordova.plugin.local-notification
ionic cordova plugin rm cordova-sqlite-storage
npm i cordova-sqlite-storage@latest
ionic cordova plugin add cordova-sqlite-storage
ionic cordova platform add [email protected]
ionic build
cordova build ios
**In my case the following sequence fixed that issue:
Remove ios platform ionic cordova platform rm ios
Remove android platform ionic cordova platform rm android
Remove sqlite storage plugin ionic cordova plugin rm cordova-sqlite-storage
Install latest sqlite storage npm package npm i cordova-sqlite-storage@latest
Install sqlite storage plugin ionic cordova plugin add cordova-sqlite-storage
Add ios platform ionic cordova platform add ios
Add android platform ionic cordova platform add android
Just run npm i cordova-sqlite-storage
This would upgrade the plugin to the latest version in which this issue is already solved.
Solved this problem by installing a lower version of cordova. Seems like every version of cordova that is > 8.1.1 breaks a number of plugins.
For instance, the plugin cordova-sqlite-storage failed to install with the following error message:
Failed to install 'cordova-sqlite-storage': 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.
To solve that issue, I simply removed cordova by calling npm uninstall cordova -g
and then installed it globally again with npm install -g [email protected]
After that fix, no more errors are getting displayed and cordova-sqlite-storage gets installed smoothly!!
Installing "cordova-sqlite-storage" for android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With