npm uninstall -g ionic
npm i -g @ionic/cli
npm install -g @ionic/cli
//First, install node.js: https://nodejs.org/
//Run in your terminal
npm install -g @ionic/cli
//If there was a previous installation of the Ionic CLI, it will need to be uninstalled due to a change in package name.
$ npm uninstall -g ionic
$ npm install -g @ionic/cli
//source: https://ionicframework.com/docs/intro/cli
To go git bash or command prompt and type the following:
npm install -g @ionic/cli
To install Cordova and Ionic, use
npm install -g ionic cordova
npm i -g @ionic/cli
npm install -g ionic@VERSION