[TIMOB-24745] Android: Cannot build CommonJS modules with multiple JS files
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-06-08T17:47:32.000+0000 |
Affected Version/s | Release 6.1.0 |
Fix Version/s | Release 6.1.1 |
Components | Android |
Labels | merge-6.1.1 |
Reporter | Hans Knöchel |
Assignee | Christopher Williams |
Created | 2017-05-29T15:06:19.000+0000 |
Updated | 2017-06-09T22:02:25.000+0000 |
Description
We fixed Android CommonJS modules for 6.1.0 in TIMOB-24654. Unfortunately, a community member reported that he still cannot build CommonJS modules, when those contain multiple JS files inside the
assets/
directory. The test-case can be used from the above ticket, with an additional JS file that is placed in the directory.
Thanks hans for opening this ticket. [Here is](https://gist.github.com/AndreaVitale/32c06ad366202ee31c5e5419a5a6fbb1) the error log that I got when I try to with another file, different from
my.module.id.js
inside theassets
folder. Removing it, the build process succeeds. I tried to build using CLI 6.2.0 and 6.2.2 and different version of NDK: from r10e to the latest.[~hansknoechel] [~Andrea.Vitale] Do we have any details or test cases about whatever remaining issue we have here? It's not clear to me exactly what is wrong here. I guess the idea is that the build doesn't fail now with multiple js assets but that one or both somehow aren't returning their exports when required?
Hi Chris, I edited the
_buildModule.js
with the snippets reported in your [PR here](https://github.com/appcelerator/titanium_mobile/pull/9117) and the problem is solved. I have no more problem at compile time and at runtime. Now I have problems on iOS. Should I to create a new ticket for this? I'm on Slack if you want to dm with me in a faster way.Verified the fix in SDK 6.2.0.v20170608114043 & local 6.1.1 build. 1. Built the https://github.com/appcelerator-modules/appcelerator.syncserver.client module which has multiple
.js
files in theassets
folder. 2. Module was built successfully. EDIT: Verified the fix with SDK 6.1.1.v20170609120621. Closing. Studio Ver: 4.9.0.201705302345 SDK Ver: 6.2.0.v20170608114043, 6.1.1.v20170609120621 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.2 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.11 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Pixel --- Android 7.1.1 ⇨ google Nexus 5 --- Android 6.0.1