Reproduce
1. Create a new default mobile project.
2. Download a sample CommonJS module superagent from [
http://gitt.io/component/superagent]
3. Include the module into project
4. Add following test code into app.js
var request = require('superagent');
request.get('http://www.baidu.com')
.end(function (res) {
console.log('Textual version of APIs:');
console.log(res.text);
});
5. Run the app with SDK 4.1.0.GA and 5.0.0.GA on both simulator and real device
Actual Result
For SDK 4.1.0, both simulator and device all work well.
For SDK 5.0.0, Only simulator works well, on device, you will get a error like following
[ERROR] Script Error Couldn't find module: superagent for architecture: arm64
Master PR: https://github.com/appcelerator/titanium_mobile/pull/7204 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7205
APPROVED. PRs merged.
Hi, I noticed the same problem with a deploy type set to test. Hope it will fix this problem as well. thanks
I tried with the 5_0_X branch, it works. Thanks.
Verified the fix. CommonJS module builds fine on a real device. Closing. Environment: Appc Studio : 4.3.0.201509151348 Ti SDK : 5.0.1.v20150922104152 Ti CLI : 5.0.3 Alloy : 1.7.10 MAC Yosemite : 10.10.4 Appc NPM : 4.2.0 Appc CLI : 5.0.2-19 Node: v0.10.37 One plus one - Android 5.1.1