Adding cordova-plugin-inappbrowser results in failed builds for iOS and Android

After adding cordova-plugin-inappbrowser, I fail to build my app for iOS and Android. This is the resulting message:

   While removing plugins                     
   from Cordova project:
   Cordova error: The plugin 'cordova-plugin-compat' is required by (cordova-plugin-geolocation), skipping uninstallation. (try --force if trying to update)

Perhaps related, I also have mdg:geolocation in my project.

How to resolve this?