The tools of the framework Ionic is using semver to see if the installed version of Cordova satisfies their requirement, see this https://github.com/driftyco/ionic-app-lib/blob/c133c055637f4e21ba3a093f9bfcc376b93468fe/lib/info.js#L295. Though your addition of "-dev" to the version number of Cordova-CLI during development releases does not follow the semver standard, and this will therefore cause an unnecessary version check error at their side.
In order to avoid these hiccups in the future (not only at Ionic) I propose that the development versions shall as well follow the semver standard. E.g. add an extra digit, like "5.1.21". I propose also that this shall apply as well to Cordova-Lib.