Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC40910A76 for ; Sat, 21 Feb 2015 00:59:23 +0000 (UTC) Received: (qmail 60195 invoked by uid 500); 21 Feb 2015 00:59:23 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 60150 invoked by uid 500); 21 Feb 2015 00:59:23 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 60138 invoked by uid 99); 21 Feb 2015 00:59:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2015 00:59:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cwarden@xerus.org designates 207.210.217.189 as permitted sender) Received: from [207.210.217.189] (HELO sage.xerus.org) (207.210.217.189) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2015 00:59:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xerus.org; s=sage; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=EDgv3YoSwiC9Z/hdzQUkGH/xJZf9QPCt7HWoOeXQ7mk=; b=FD3YQ/IQnIKbV5YVggdkltDD+pQULy2nB4vkzFJl/tBWt5NQjbPe+sGIPLjD7QAeaPdUGn1NpiL8ufnYxCtvSfAgOy7qha2PZcXINz9XwSgUTZhY7v25O8qBCOCxuXiDtjv9GEdx4om87TRYpQjkLt6qnX2+zhlpntLkBX1+Z/w=; Received: from c-71-59-214-243.hsd1.or.comcast.net ([71.59.214.243] helo=speedy.xerus.org) by sage.xerus.org (envelope-from ) with esmtpsa (Exim 4.80 #2 (Debian)) id 1YOyPJ-0003KZ-9v for ; Fri, 20 Feb 2015 16:58:57 -0800 Received: from cwarden by speedy.xerus.org with local (Exim 4.80) (envelope-from ) id 1YOyPI-0002lJ-2J for dev@cordova.apache.org; Fri, 20 Feb 2015 16:58:56 -0800 Date: Fri, 20 Feb 2015 16:58:55 -0800 From: "Christian G. Warden" To: dev@cordova.apache.org Subject: Re: prepare --browserify fails to find referenced modules Message-ID: <20150221005855.GW32580@xerus.org> References: <20150218185129.GM32580@xerus.org> <20150219045557.GN32580@xerus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Face: jD^+@)>yf8|'#1~7ie$N]>2XN},k*wInk~T->gX/l"0?GDg#b;M[;(4'R94H`6,~p"&"(`$ ?KVH_(2BuS[Zi(IFt,DWb'j77JZMQ~S0mN]o^>zAGQOaz6/uCSFu(O,jf*(e<*'Sa~yW1k1RC0xhd1 ]'F2p]Wvt3bJ$i2E69!rDttE@/nw?1kS#-#Al(p=G\{Jj4GaRlN(V=R@+&dqD{`v7Y{!WE_?H!iD2D Z$ User-Agent: Mutt/1.5.23 (2014-03-12) X-Sender-Verification: OK X-Virus-Checked: Checked by ClamAV on apache.org Hi Steven, I would be happy to submit a pull request. Can you point me in the direction of the tests that should be updated? I'm not seeing anything obvious related to browserify in the test directory. Christian On Thu, Feb 19, 2015 at 04:02:19PM -0700, Steven Gill wrote: > Good catch. Thanks for letting us know. Do you mind sending over a pull > request? I will have to test it with our core plugins. > > On Wed, Feb 18, 2015 at 9:55 PM, Christian G. Warden > wrote: > > > 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 > > 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. > > > > It looks like I was mistaken. The problem seems to simply be that the > > browserify transform only handles apache modules and local references > > correctly. > > > > I've been able to get the bundled cordova.js built with a small > > change: > > > > https://github.com/cwarden/cordova-js/commit/943348db348e62e8245c5ca2b7dad6feecc7fb34 > > > > Still need to do more testing. > > > > Christian > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > > For additional commands, e-mail: dev-help@cordova.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org