Friday 27 March 2015

Issue with Cordova 4.3.0 behind a corporate firewall & Proxy

While working with npm and cordova I have encountered an issue with Cordova when running it behind our corporate firewall & proxy.
Initially we thought the issue was related to the issue described here: http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/.
But we discover that while npm could be fixed as described here this didn’t fix Cordova.

We have configured npm to point at our Sonatype repository but we discovered that Cordova does not pick up the ‘registry’ setting from npm as it has the registry hard coded in several places.
ie.  In lazy_load.js

Line #148 is the original line which we have had to modify with line #149.


This issue manifests when we do a “cordova platform add ios” for example.

You can go throught all the js files and replace all the lines where it occurs but only lazy_load.js seemed to be the problem.

I would also update the 'version' entry in your cordova package.json file as well to ensure that you know you have patched your instalation.

See: https://stackoverflow.com/questions/29306422/issue-with-cordova-4-3-0-behind-a-corporate-firewall



No comments:

Post a Comment