cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian G. Warden" <>
Subject Re: prepare --browserify fails to find referenced modules
Date Thu, 19 Feb 2015 04:55:57 GMT
On Wed, Feb 18, 2015 at 10:51:29AM -0800, Christian G. Warden wrote:
> When using the --browserify option to `cordova prepare`, I'm running into a
> problem with a plugin that refers requires other javascript modules defined in
> a plugin, either within the same plugin or another one.
> Here's an example:
> $ cordova create CordovaBrowserifyTest
> $ cd CordovaBrowserifyTest
> $ cordova platform add android
> $ cordova plugin add
> $ cordova prepare --browserify
> Error: Cannot find module 'com.salesforce.util.exec' from '/home/cwarden/git/CordovaBrowserifyTest/plugins/com.salesforce/www'
>     at /home/cwarden/.nvm/v0.11.16/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:51:17
>     at process (/home/cwarden/.nvm/v0.11.16/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:159:43)
>     at /home/cwarden/.nvm/v0.11.16/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:168:21
>     at load (/home/cwarden/.nvm/v0.11.16/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:99:43)
>     at /home/cwarden/.nvm/v0.11.16/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:105:22
>     at /home/cwarden/.nvm/v0.11.16/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-js/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
>     at FSReqWrap.oncomplete (fs.js:99:15)
> I suspect the problem could be related to the fact that the name of the module
> being required, com.salesforce.util.exec, doesn't match the id of the plugin,
> com.salesforce.

It looks like I was mistaken.  The problem seems to simply be that the
browserify transform only handles apache modules and local references

I've been able to get the bundled cordova.js built with a small

Still need to do more testing.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message