{ "id": "171577", "key": "TIMOB-25996", "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": null, "resolutiondate": null, "created": "2018-04-30T12:42:49.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "cb-tooling", "config", "engSchedule", "modules" ], "versions": [ { "id": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" }, { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-30T22:00:13.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "When i set a custom module path using *appc ti config paths.modules \"mycustom/path\"*, the modules I put in here are not recognized in the build command.\r\n\r\nI checked using the *appc ti module* command, and my module is listed under *Configured Path Modules*, and not under *Global Modules* (which is correct). However, the one under Configured Path Modules points to the correct path but it is not recognized during build, and therefore it throws:\r\n\r\n{code}\r\n[ERROR] Could not find all required Titanium Modules:\r\n[ERROR] id: com.mymodule\t version: 1.1.0\t platform: iphone\t deploy-type: development\r\n{code}\r\n\r\nThe desired situation checks both the default directory (the global one under \"~/Library/Application Support/Titanium/modules\"), but also the custom directory added using the config file.\r\n\r\n", "attachment": [], "flagged": false, "summary": "CLI: build process does not lookup modules the same way as ti module", "creator": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "environment": "appc 7.0.2", "comment": { "comments": [ { "id": "437239", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This is a valid bug and looks to be due to a discrepancy in the lookup functions used in each case ({{ti module}} vs {{ti build}}). \r\n\r\n{{ti module}}, calls [scopedDetect|https://github.com/appcelerator/node-appc/blob/d42127a142569be3201cab1530beef06dac021f3/lib/timodule.js#L47-L78] which assumes that the paths given to it are valid paths to a modules directory (e.g /Users/eharris/Library/Application\\ Support/Titanium/modules) this then just scans the directory as normal and therefore detects all modules.\r\n\r\n{{ti build}}, calls (eventually) [detect|https://github.com/appcelerator/node-appc/blob/d42127a142569be3201cab1530beef06dac021f3/lib/timodule.js#L93-L184] which assumes that the paths given to it are valid paths to the parent of a modules directory (e.g /Users/eharris/Library/Application\\ Support/Titanium), during the detection it will then construct the modules path to search ( /Users/eharris/Library/Application\\ Support/Titanium/modules), if you've already given it the full path ( /Users/eharris/Library/Application\\ Support/Titanium/modules) then you get an invalid path ( /Users/eharris/Library/Application\\ Support/Titanium/modules/modules).\r\n\r\nThe easy workaround for now is to include both paths in the paths.modules array, you can add them in one go by just including them in the same command {{ti config paths.modules /Users/eharris/Desktop/ /Users/eharris/Desktop/modules}}. [~uzbbert] could you maybe try that and see if it works for you?\r\n\r\nEdit: There is actually a specific order you have to enter them it, I had it in the wrong order previously the parent directory (the one without /modules) *_+must be passed first+_* and show in the first position of the paths.modules array, then the child directory second", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-05-01T10:01:11.000+0000", "updated": "2018-05-01T10:09:01.000+0000" }, { "id": "437245", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "yes thank you, the workaround works. Only inconvenience now is that I had to change my custom directory to *modules* locally, because it is actually a git repository that is named differently on the remote. But it'll do for now, thanks for the quick investigation.", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2018-05-01T10:35:57.000+0000", "updated": "2018-05-01T10:35:57.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }