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
I just want to add an official answer to Swaminathan Vetri suggestion. Here's exactly what I did to resolve:
sudo npm cache clean make sure to run with sudo
sudo npm cache clean
and then,
sudo npm install -g cordova again make sure to run with sudo.
sudo npm install -g cordova
Thanks!