Before proceeding, make sure your computer has Node.js installed. See these instructions to set up an environment for Ionic.
1.-Install the Ionic CLI with npm:
npm install -g @ionic/cli
2.-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
3.-The majority of Ionic app development can be spent right in the browser using the ionic serve command:
cd myApp
ionic serve