title: Cordova error: Using "requireCordovaModule" to load non-cordova module "q" is not supported
body: <p>I noticed that the builds on our CI started to fail because of the following error:</p>
  
  <pre><code>Discovered plugin "cordova-plugin-app-version" in config.xml. Adding it to the project
  
  Installing "cordova-plugin-app-version" for android
  
  Adding cordova-plugin-app-version to package.json
  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.
  [ERROR] Exception: 
  The command '/bin/sh -c ionic cordova platforms add android' returned a non-zero code: 1
  </code></pre>
  
  <p>Same issue happens on both iOS and Android.</p>
  
  <p>After some digging, I found that <a href="https://github.com/apache/cordova-lib/blob/master/RELEASENOTES.md#900-mar-15-2019" rel="noreferrer">cordova 9.0.0</a> was recently released.</p>
  
  <p>There are a couple of changes related to this issue.</p>
  
  <ul>
  <li>GH-710 Drop Q Dependency and Use Native Promises</li>
  <li>GH-707 Deprecate requireCordovaModule for non-Cordova modules</li>
  </ul>
  
  <p>My first thought was that somehow we didn't have our cordova version locked, but we did lock it to <code>cordova@8.1.2</code> in our dockerfile. I also tested it on my local machine and I cordova version <code>8.1.2</code> as well. So this can't be the issue.</p>
  
  <p>After looking at the logs some more, I noticed some logs like these:</p>
  
  <p><code>cordova-android version check failed ("/app/platforms/android/cordova/version"), continuing anyways.</code></p>
  
  <p>There were a couple of those, like 3 or 4, but the build did not stop when that happened.</p>
  
  <p>I then ran the build of an older commit again, and it worked fine, probably because some layers were cached. But if I changed only a single package (I updated prettier to try it out), it caused most of the layers to be rebuilt and the build crashed with the above error.</p>
  
  <p>It seems that somehow some dependencies deeper down got updated, which are causing the issue.</p>
  
  <p>Thanks for your help.</p>