Build ionic Environment under Mac

Source: Internet
Author: User
Tags install node

Say it in the front.

At that time, because of the poor network environment, a variety of unsuccessful, in the Internet to find a long tutorial, a lot of pits, now put their own practice of the success of the writing, give everyone a reference bar.

Operation Steps:

1. Install node. js

2, installation Cordova

3, installation Ionic

4. Verification

5, install Ios-sim, Ios-deploy

I. Installing node. js

To install Cordova and Ionic, node. js must be installed first, because Cordova and ionic need to be installed online by command. To download the node. JS installation package installation, URL is https://nodejs.org/en/, download the recommended use, such as:

After the installation is complete, enter the following command in Terminal Terminal to verify the installation success:

Node-v

Npm-v

Second, installation Cordova

Need to be installed online by command. Network environment is poor, through the mirror installation success (if you can fq, do not so toss, directly according to the official website of the operation process is good ...) ),

1) Set the image

npm config set registry http://registry.cnpmjs.org

2) Install Cordova (in fact, you can also ionic a piece of the outfit, but did not try ...) )

sudo cnpm install-g Cordova

3) test whether the installation was successful:

cordova-v

Third, installation ionic

This installation of the comparison Tangled, First sudo cnpm install-g ionic Install multiple failures. Mainly reflected in the always hint less model, which means that there is no complete installation, ionic an installation once failed, do not install, need to uninstall before installing the Ionic, encountered a similar problem, go online search How to uninstall Ionic bar, here is not elaborate, can refer to this article HTTP ://www.bubuko.com/infodetail-1125544.html. I did it more simply and rudely, to find Ionc's installation directory/usr/local/, then delete the local folder, and then reinstall node and Cordova.

then enter the following command to install Ionic success

sudo npm install-g cnpm--registry=http://r.cnpmjs.org

npm Install Microtime --Registry=http://r.cnpmjs.org--disturl=http://dist.cnpmjs.org

sudo npm install-g ionic installation succeeded

Iv. Verification

Ionic Info This command outputs Ionic version information and which are not installed, as shown in:

Ionic start myApp (your project name) This command succeeds, indicating that the installation was successful.

V. Installation of Ios-sim, Ios-deploy

sudo cnpm install-g Ios-sim

sudo cnpm install-g ios-deploy This command may error, if error, with sudo npm install-g ios-deploy--unsafe-perm=true instead

The above is I build ionic process, I hope you do not encounter these problems when installing??。

Build ionic Environment under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.