{ "id": "174748", "key": "AC-6492", "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": null, "resolutiondate": null, "created": "2020-02-19T14:40:55.000+0000", "labels": [ "hyperloop", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-02-26T05:03:10.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": "15000", "name": "Hyperloop" } ], "description": "Compiling a project with Hyperloop and LiveView doesn't work as expected.\r\n\r\nHere is my code:\r\n{code}\r\nimport { UIView, UIColor, UIBezierPath } from 'UIKit';\r\nimport { CAShapeLayer } from 'QuartzCore';\r\nimport { CoreGraphics } from 'CoreGraphics';\r\n\r\nmodule.exports = {\r\n createPanelView: function(creationArgs) {\r\n const container = Ti.UI.createView(creationArgs);\r\n const panel = UIView.cast(container);\r\n{code}\r\n\r\nThis is working fine *without* LiveView. Cleaning the project and running it *with* LiveView enabled gives this error:\r\n\r\n{code}\r\n[ERROR] TypeError: (0, _UIKit.UIView) is not a function. (In '(0, _UIKit.UIView)()', '(0, _UIKit.UIView)' is undefined)\r\n[ERROR] File: app.js\r\n[ERROR] Line: 10\r\n[ERROR] SourceId: undefined\r\n[ERROR] Backtrace:\r\n[ERROR] undefined\r\n{code}\r\n\r\nIf I clean the project, I recompile it *without* LiveView and restart it *with* LiveView (without cleaning it before) everything is working as expected. ", "attachment": [], "flagged": false, "summary": "Hyperloop: weird behavior compiling a project with LiveView enabled", "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": "macOS 10.15.3\r\nTi SDK 9.0.0.RC", "comment": { "comments": [ { "id": "454338", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Does the {{require}} notation work?\r\n\r\n{code}\r\nconst UIView = require('UIKit/UIView');\r\n{code}", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-19T14:55:06.000+0000", "updated": "2020-02-19T14:55:06.000+0000" }, { "id": "454343", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yes, using require it works as expected.", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-19T16:57:17.000+0000", "updated": "2020-02-19T16:57:17.000+0000" }, { "id": "454344", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Good to know! I found the same as well but perhaps it was a local problem. I guess it is a transpile problem, and as a workaround you could use the require methods for now.", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-19T17:06:09.000+0000", "updated": "2020-02-19T17:06:09.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }