I try updating my ionic cordova cli when i started getting issues installing the two package, but now ionic have been successfully installed and i have tried installing the
try running the command
npm cache clean first
npm cache clean
and then re-install the package by running
npm install -g cordova