How To Install Cordova From Source (with npm)

16 Feb

Cordova is frequently taking bug fixes, and it takes a while for these to make it to the official release you get during a simple npm install.

Most relevant for me recently, is the fact that Cordova 4.2.0 (and before) contain a bug affecting Windows targets.  Without this bug fix it is impossible to target a specific architecture for an assembly, which is required for targeting desktop vs. phone.

https://issues.apache.org/jira/browse/CB-8123

Luckily this issue (and others) have been resolved and committed to the git repository.  You just need to install Cordova from the repo directly.  Luckily that isn’t very hard to do properly, and easy to upgrade later when it is officially released.

Open up an administrative command prompt (required for the global npm install) and clone the two repos, and npm install them:

Thats all – You can verify the version you have (currently 4.2.1-dev) like this:

Leave a Reply

Your email address will not be published. Required fields are marked *