{ "id": "127954", "key": "TIMOB-16786", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-11-16T15:43:23.000+0000", "created": "2014-03-21T15:22:30.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "commonJS", "path", "relative", "require" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": null, "updated": "2018-11-16T15:43:23.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": "Can't run the example from docs: https://wiki.appcelerator.org/display/guides/CommonJS+Modules+in+Titanium#CommonJSModulesinTitanium-JavaScriptModulePathResolution\r\n\r\n\r\n\"./\" seems point to alway point to \"Resources\"\r\n\"../\" give substringToIndex error\r\n\r\nAndroid works as expected.\r\n\r\nvar myModule = require(\"../lib/myModule\")();\r\n//[ERROR] : Script Error * -[__NSCFConstantString substringToIndex:]: Index 1 out of bounds; string length 0\r\n\r\nvar SomeOtherCustomView = require('../widgets/SomeOtherCustomView')();\r\n//[ERROR] : Script Error Couldn't find module: ./widgets/SomeOtherCustomView\r\n\r\nProject from guide example attached", "attachment": [ { "id": "46790", "filename": "test path.zip", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-03-21T15:22:30.000+0000", "size": 639893, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Module relative path resolution does not work anymore", "creator": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Mac OSX, Titanium SDK 3.2.2", "comment": { "comments": [ { "id": "299286", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering based on Mr. Rahman's verification.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-31T04:24:05.000+0000", "updated": "2014-03-31T04:24:05.000+0000" }, { "id": "443693", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This ticket is quite outdated, this should work fine now.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-11-16T15:43:23.000+0000", "updated": "2018-11-16T15:43:23.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }