We’ve quietly introduced a new feature - outdated plugin checking. It appears at the end of the log on jobs which fail:
Package Current Wanted Latest Location
cordova-android 9.1.0 9.1.0 10.1.2 node_modules/cordova-android
cordova-plugin-camera 5.0.3 5.0.3 6.0.0 node_modules/cordova-plugin-camera
cordova-plugin-file 6.0.2 6.0.2 7.0.0 node_modules/cordova-plugin-file
cordova-plugin-media 5.0.4 5.0.4 6.0.0 node_modules/cordova-plugin-media
cordova-plugin-media-capture 3.0.3 3.0.3 4.0.0 node_modules/cordova-plugin-media-capture
In the above example, 5 plugins are using outdated versions. This can cause a variety of problems - it’s good practice to keep your plugins up to date.
To fix this, look at your config.xml file. The version of the plugin used depends on two things:
- What version did you set the plugin spec to?
- What is the highest version the engine you have selected can use?
In this example, the camera plugin is declared in config,xml without a version:
<plugin name="cordova-plugin-camera" source="npm" />
Which means use the latest supported version. To explicitly set the version (it’s good practice), do the following:
<plugin name="cordova-plugin-camera" source="npm" spec="5.0.3" />
So why it is using 5.0.3 instead of 6.0.0? It’s due to this line:
Package Current Wanted Latest
cordova-android 9.1.0 9.1.0 10.1.2
The project is using an old version of the Android engine (9.1.0), which does not support version 6 of cordova-plugin-camera.
This user should update his project to the current version of the engine. The other outdated packages will then be updated automatically.