{ "id": "77324", "key": "AC-3090", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-07-09T12:32:47.000+0000", "created": "2011-07-03T10:16:49.000+0000", "labels": [ "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "tguntharp", "key": "tguntharp", "displayName": "Tony Guntharp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:08.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Trying Ti create a simple CommonJS JavaScript module. Once the require()statement is called and assigned to a variable, trying to call an exported function failed with a 'not a Ti function'.\r\n\r\nI've seen a QA entry where someone has seen a similar issue.\r\n\r\nEg:\r\n\r\nmodule.js:\r\n\r\nexport.init = function(args) {\r\n //Do something\r\n}\r\n\r\n-------------\r\napp.js:\r\n\r\nvar tmp = require('module');\r\n\r\ntmp.init();\r\n\r\n--------------\r\n", "attachment": [], "flagged": false, "summary": "Trying to create simple CommonJS module seems to fail in Ti Studio with Sk 1.7.1", "creator": { "name": "byron", "key": "byron", "displayName": "Byron Davies", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "byron", "key": "byron", "displayName": "Byron Davies", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Using latest version of Ti Studio, and tested on SDK 1.7.1, 1.7 and 1.6", "comment": { "comments": [ { "id": "159137", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Bryon\n\nHave you followed the guide on this? It's a bit hidden away, admittedly. See [Building JavaScript Native Modules|http://wiki.appcelerator.org/display/guides/Module+Developer+Guide+for+iOS#ModuleDeveloperGuideforiOS-BuildingJavaScriptNativeModules].\n\nGo through that and try again. Also you have missed some vital information, detailed in the [Jira Ticket Checklist|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist].\n\nI'm closing for now, but will be happy to reopen if it transpires that there really is a bug.\n\nCheers", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T12:31:40.000+0000", "updated": "2011-07-09T12:31:40.000+0000" }, { "id": "159138", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Reopening due to incorrect resolve reason :/", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T12:32:17.000+0000", "updated": "2011-07-09T12:32:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }