I noticed that the builds on our CI started to fail because of the following error:
Discovered plugin \"cordova-plugin-app-version\" in config.xml. Adding it
This is what worked for me: I removed cordova by calling
npm uninstall cordova -g
and then installed it globally again with
npm install -g cordova@8.1.1
Here's a little tip in finding where requireCordovaModule
exists:
For those looking to change requireCordovaModule
to require
, I have found it easy to search for the requireCordovaModule
text right from the command line by using this command:
grep -r 'requireCordovaModule' ./
Then, you can drill into those files and rename the requireCordovaModule
to require
.
remove cordova-plugin-crosswalk-webview
I also get this error after updating to 9.0.0. In my case I fixed it doing a clean up and rebuilding my app. You can try the following steps.
npm install -g cordova
./android/tools/bin/sdkmanager "build-tools;28.0.3" "platforms;android-28"
export ANDROID_SDK_ROOT=~/android
(1) ANDROID_HOME is deprecated but still working
cordova platform add android
cordova plugin add cordova-plugin-whitelist
cordova build
You can check a resume of your app with: cordova info
If you want to see a list of your plugin you can use: cordova plugins ls
Hope this help or at least point someone to the right direction :)
i can solve this issue by downgrading cordova to 8.1.1
.
npm remove cordova -g && npm install -g cordova@8.1.1
This solution worked for me - https://github.com/xpbrew/cordova-sqlite-storage/issues/856#issuecomment-497298630
For whatever plugin this error is associated with, run:
cordova platform rm ios
cordova platform rm android
cordova plugin rm <package-name>
npm i <package-name>@latest
cordova plugin add <package-name>
cordova platform add ios
cordova platform add android
edit: I recently discovered that running:
cordova platform add ios && cordova platform add android
would not install the most recent versions, would be nice for someone to explain why this is different to running them seperately, but this was my problem.