[AC-4991] LiveView causes error with ES6 code
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2017-05-24T16:49:50.000+0000 |
Affected Version/s | Appcelerator Studio 4.5.0 |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ES6, LiveView, Titanium |
Reporter | Brenton House |
Assignee | Shak Hossain |
Created | 2017-05-23T23:07:56.000+0000 |
Updated | 2017-05-24T16:49:50.000+0000 |
Description
If there is ES6 code in the app, and the app is then saved, an error is generated.
Steps to recreate:
1. Create a new Titanium app using the CLI
2. Open the file
controllers/index.js
3. Add the following line:
[1,2,3,4,5].forEach(x => console.log(x));
4. Run app: appc ti build --platform ios --target simulator --log-level trace --liveview
5. App should start successfully.
6. Save the file: controllers/index.js
to force LiveView restart.
The following error occurs:
{noformat}
[ERROR] TypeError: Alloy.createController is not a function. (In 'Alloy.createController("index")', 'Alloy.createController' is undefined)
[ERROR] File: app.js
[ERROR] Line: 6
{noformat}
Marking as duplicate of CLI ticket around same issue.