{ "id": "151260", "key": "TIMOB-19545", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16778", "description": "Release 5.0.1", "name": "Release 5.0.1", "archived": false, "released": true, "releaseDate": "2015-09-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-09-20T09:54:24.000+0000", "created": "2015-09-18T02:49:06.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "CommonJS", "Module", "SDK5.0.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2015-09-22T21:43:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Reproduce\r\n1. Create a new default mobile project.\r\n2. Download a sample CommonJS module superagent from [http://gitt.io/component/superagent]\r\n3. Include the module into project\r\n4. Add following test code into app.js\r\n{code}\r\nvar request = require('superagent');\r\n\r\nrequest.get('http://www.baidu.com')\r\n.end(function (res) {\r\n console.log('Textual version of APIs:');\r\n console.log(res.text);\r\n});\r\n{code}\r\n5. Run the app with SDK 4.1.0.GA and 5.0.0.GA on both simulator and real device\r\n\r\nh6.Actual Result\r\nFor SDK 4.1.0, both simulator and device all work well.\r\nFor SDK 5.0.0, Only simulator works well, on device, you will get a error like following\r\n{code}[ERROR] Script Error Couldn't find module: superagent for architecture: arm64{code}", "attachment": [], "flagged": false, "summary": "Unable to use CommonJS modules on real device with SDK 5.0.0.GA", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "iOS 8.4\r\niPhone 6plus\r\nTl SDK 5.0.0.GA\r\nAppC CLI 5.0.0", "closedSprints": [ { "id": 495, "state": "closed", "name": "2015 Sprint 19 Tooling", "startDate": "2015-09-14T16:11:58.378Z", "endDate": "2015-09-26T01:11:00.000Z", "completeDate": "2015-09-28T18:59:46.802Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "364308", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/7204\r\n5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7205", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-18T16:44:03.000+0000", "updated": "2015-09-18T16:44:03.000+0000" }, { "id": "364383", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "APPROVED. PRs merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-20T09:53:52.000+0000", "updated": "2015-09-20T09:53:52.000+0000" }, { "id": "364603", "author": { "name": "vdegroote", "key": "vdegroote", "displayName": "Vincent Degroote", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi,\r\n\r\nI noticed the same problem with a deploy type set to test. Hope it will fix this problem as well.\r\n\r\nthanks", "updateAuthor": { "name": "vdegroote", "key": "vdegroote", "displayName": "Vincent Degroote", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-09-22T10:03:14.000+0000", "updated": "2015-09-22T10:03:14.000+0000" }, { "id": "364615", "author": { "name": "vdegroote", "key": "vdegroote", "displayName": "Vincent Degroote", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tried with the 5_0_X branch, it works.\r\nThanks.", "updateAuthor": { "name": "vdegroote", "key": "vdegroote", "displayName": "Vincent Degroote", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-09-22T12:32:46.000+0000", "updated": "2015-09-22T12:32:46.000+0000" }, { "id": "364726", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nCommonJS module builds fine on a real device.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.3.0.201509151348\r\nTi SDK : 5.0.1.v20150922104152\r\nTi CLI : 5.0.3\r\nAlloy : 1.7.10\r\nMAC Yosemite : 10.10.4\r\nAppc NPM : 4.2.0\r\nAppc CLI : 5.0.2-19\r\nNode: v0.10.37\r\nOne plus one - Android 5.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-22T21:43:44.000+0000", "updated": "2015-09-22T21:43:44.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }