{ "id": "148984", "key": "TIMOB-19914", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2020-01-07T18:35:53.000+0000", "created": "2015-06-21T13:34:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module", "studio", "titanium" ], "versions": [], "issuelinks": [ { "id": "52184", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "161603", "key": "MOD-2267", "fields": { "summary": "SyncServer Client: Getting error \"dlopen failed: /data/app/com.app.synctest-2/lib/arm/libappcelerator.syncserver.client.so: has text relocations\" when building for android", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52188", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "148855", "key": "TIMOB-23490", "fields": { "summary": "iOS: Hybrid CommonJS and Native modules don't export commonjs", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "54819", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "167433", "key": "TIMOB-24654", "fields": { "summary": "Android: Hybrid CommonJS and Native Modules don't export the commonjs code", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55164", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "168303", "key": "TIMOB-24796", "fields": { "summary": "iOS: Hybrid CommonJS and Native modules don't handle multiple js files", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2020-01-07T18:35:53.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When I create a CommonJS Module, any exported method is accessible.\r\n\r\nIn detail for the module I've:\r\n# Created a new Mobile Module Project, from Appcelerator Studio, with id (for example) it.module.test\r\n# Inside _assets_ folder, I've created a js file called _it.module.test.js_\r\n# Into _it.module.test.js_ I have: \r\n{code:javascript}\r\nexports = { \r\n something: \"hi\" \r\n}\r\n{code}\r\n\r\nNow I package this module directly from Appcelerator Studio and install this module inside a Test Application.\r\n\r\nInto this application I do:\r\n{code:javascript}\r\nvar module = require(\"it.module.test\");\r\nTi.API.info(module.something);\r\n{code}\r\n\r\nAnd the result is *null*.\r\n\r\nIt seems that the problem is that the native module classes have being called instead of the CommonJS ones as per the docs.", "attachment": [], "flagged": false, "summary": "Creation of Packaged JavaScript and Hybrid Modules: it doesn't work properly", "creator": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Appcelerator Studio 4.0.1\r\nMac OSX Yosemite\r\nTitanium SDK 4.0.0", "comment": { "comments": [ { "id": "453479", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as duplicate of TIMOB-23490", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-07T18:35:53.000+0000", "updated": "2020-01-07T18:35:53.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }