On Windows: npm install -g
cordova@<latest_supported_version>
On Mac: sudo npm install -g
cordova@<latest_supported_version>
-g indicates that Apache Cordova should be installed
globally.
On Mac, when prompted, enter your root user password.
Verify the Cordova installation by entering this command at the command prompt, or in the
terminal window:cordova –v
The output shows the Cordova version installed, for example,
6.0.0.
You should also scroll back through the entire installation history shown in
the terminal and look for errors to verify the installation was successful.