cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian G. Warden" <cwar...@xerus.org>
Subject prepare --browserify fails to find referenced modules
Date Wed, 18 Feb 2015 18:51:29 GMT
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 https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
$ 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.

Any suggestions?

Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message