Diagnostic plugin issue on windows phone

Hi there

I am trying to install the windows platform to my ionic app. Everything seems to go fine until the diagnostic plugin([https://ionicframework.com/docs/native/diagnostic/])tries to get added. I receive the following error “error missing windows target version”. I made sure that I inserted this line into config.xml too. Any suggestions?

I went through the usuals of removing, re-adding platform etc.

the exact error log is as follows

Failed to install 'cordova.plugins.diagnostic': Error: Variable(s) missing: WINDOWS-TARGET-VERSION
    at Object.mergeVariables (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/variable-merge.js:58:15)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:315:44
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
    at process._tickCallback (internal/process/next_tick.js:150:11)

(node:80585) UnhandledPromiseRejectionWarning: Error: Variable(s) missing: WINDOWS-TARGET-VERSION
    at Object.mergeVariables (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/variable-merge.js:58:15)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:315:44
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
    at process._tickCallback (internal/process/next_tick.js:150:11)
(node:80585) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:80585) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.