Learning Ionic(Second Edition)
上QQ阅读APP看书,第一时间看更新

Installing Node.js

Since Ionic uses Node.js for its CLI as well as for the build tasks, we will first install it as follows:

  1. Navigate to https://nodejs.org/.

Click on the Install button on the homepage and an installer for our OS will automatically be downloaded. We can also navigate to https://nodejs.org/download/ and download a specific copy.

  1. Install Node.js by executing the downloaded installer.

To verify that Node.js has been successfully installed, open a new Terminal (*nix systems) or Command Prompt (Windows systems) and run the following command:

        node -v
> v6.10.1
  1. Now execute the following command:
      npm -v
> 3.10.10

npm is a Node Package Manager that we will be using to download various dependencies for our Ionic project.

We need Node.js only during the development. The version specified is only for illustration. You may have the same version or the latest version of the software.