VS2017 Cordova Ionic2 mobile development-Environment Building, vs2017cordova

Source: Internet
Author: User

VS2017 Cordova Ionic2 mobile development-Environment Building, vs2017cordova

1. Document Overview

This document describes how to configure the runtime environment for cross-platform development using Ionic 2 in Visual Studio 2017.

2. installation environment

Windows 10

3. Install Visual Studio 2017 community

3.1 Official: https://www.visualstudio.com/downloads/

3.2 To run the installer, select mobile development that uses JavaScript, as shown in.

3.3 install VS2017 extended Ionic2

3.3.1 run VS2017 and click "Tools"> "Expand" and "Update" in the menu bar.

3.3.2 install NPM Task Runner

Click on the left of the extension and update windowOnlineSearch for NPM Task Runner on the right and clickDownload

3.3.3 install Ionic2

Search Ionic2 for Ionic 2 Templates for Visual Studio 2017, and then click Download.

3.3.4 disable Visual Studio 2017 and install the two extensions downloaded above.

 

Or, after installing node. js, run the following command in the command line:Npm install-g cordova ionic

 

3.4 create an Ionic2 Project

 

Click OK. The solution Resource Manager dependency on the right is being restored.

If the restore fails, use the proxy tool FQ such as VPN.

 

3.5 run

If everything goes smoothly and all the dependencies are restored successfully, the execution can begin.

It takes a while to run the program. The following page will be displayed in the browser later, indicating that the operation is successful.

 

 

3.6 but is it so smooth ?!

I restored the dependency here. Even if the proxy and vpn are enabled, the @ ionic/app-scripts is not installed.

3.6.1 Solution

Go to the windows command prompt.

Input: npm install @ ionic/app-scripts @ latest -- save-dev

If it is successfully executed, go to VS2017 again and you will find that @ ionic/app-scripts has been updated.

3.6.2 however

Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-51_binding.node ":

How can this problem be solved:

1. manually download the link shown above in the browser and save the file to a directory.

2. Then enter the windows Command Prompt: set SASS_BINARY_PATH = E:/Tools/win32-x64-51_binding.node

3. Run npm install @ ionic/app-scripts @ latest -- save-dev again.

OK.

3.6.1 If none of the above commands can be executed, you may need to download and update Node. js

Download: https://nodejs.org/en/

After the installation is complete, the Node. js command prompt shortcut will be displayed in the Start Menu of windows.

Click this shortcut and execute the above npm command in this window

 

Related Article

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.