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
As the error says, you need to require the q. Go to npmInstall.js (Search the requireCordovaModule in your project then you will see the npmInstall.js ).
Then, add these lines;
var q = require('q');
var npmModule = require('npm');
and replace: var Q = context.requireCordovaModule('q'); with
var Q = context.q;
and replace: var npm = context.requireCordovaModule('npm'); with
var npm = context.npmModule;