Cordova Installation or Setup


To install the cordova command-line tool, follow these steps:

  1. Download and install Node.js. On installation you should be able to invoke node and npm on your command line.

    • To see if Node is installed, open your CLI (command line interface). For Windows it's the Windows Command Prompt, for MAC it's the Terminal. Type:

      $ node -v

      This should print a version number, so you’ll see something like this v0.10.35. If Node is not installed find your OS and follow the instructions here:

  2. (Optional) Download and install a git client, if you don't already have one. Following installation, you should be able to invoke git on your command line. The CLI uses it to download assets when they are referenced using a url to a git repo.

  3. Install the cordova module using npm utility of Node.js. The cordova module will automatically be downloaded by the npm utility.

on OS X and Linux:

 $ sudo npm install -g cordova

on Windows:

C:\>npm install -g cordova

The -g flag above tells npm to install cordova globally. Otherwise it will be installed in the node_modules subdirectory of the current working directory.

Following installation, you should be able to run cordova on the command line with no arguments and it should print help text.