[TIMOB-24720] iOS: Error when using ES6 keywords with Hyperloop enabled
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-05-26T10:26:41.000+0000 |
Affected Version/s | Hyperloop 2.1.0 |
Fix Version/s | Hyperloop 2.1.1 |
Components | Hyperloop |
Labels | hyperloop, titanium |
Reporter | Brenton House |
Assignee | Ewan Harris |
Created | 2017-05-22T23:18:47.000+0000 |
Updated | 2017-05-31T17:56:34.000+0000 |
Description
I am getting this error when I try const test = 5 (same thing happens with let)
[ERROR] The keyword 'const' is reserved
NOTE: In trying to recreate this with new project, I am noticing that it only happens when Hyperloop is enabled.
See steps to recreate below.
Attachments
File | Date | Size |
debug.log | 2017-05-23T12:07:07.000+0000 | 206285 |
[~brentonhouse] Hey there! Thanks for the report, could you provide a little more information about the issue? * Is the project a classic project or an alloy project * Could you copy the full error log when running your command with
-l trace
* Some other versions such as CLI versionappc -v -o json
Thanks!Thanks [~eharris] It is an Alloy project. Steps to recreate. 1. Create new project with CLI 2. Select option to enable Hyperloop 3. Change 'var' to 'const' in alloy.js 4. Execute: appc ti build --platform ios --target simulator --log-level trace {noformat} appc -v -o json {"NPM":"4.2.9","CLI":"6.2.1"} {noformat} I will attach the log file as well. Also as a separate issue, notice that the CLI did not accept my parameter of --log-level trace You can see in the log file that the parameter was there but the CLI still prompted me for log level.
If it is of any help, the error seems to be coming from the
nodent
npm package.[~brentonhouse] Thanks for the tips! Moving this over to TIMOB so apologies for any email spam you might receive :)
Makes sense to include this in 2.1.1. I see your 2_1_X backport, so please also make a PR for master. [~jvennemann] wanna review? :-) [~cwilliams] may be a good additional reviewer.
I assume the issue with the --log-level flag is a separate issue and I should create a different ticket, correct?
Yes, the removal of the flag is separate to this issue. It's a known issue (CLI-1208), so no need to worry about filing a new ticket :)
Thanks [~eharris]!
LGTM! [~eharris] good idea to move to babylon for parsing, so we are in sync with node-titanium-sdk. I opened TIMOB-24721 for that, just FYI.
[~eharris] Is the review done on this one. Can it be merged? We're hoping to get 2.1.1 released Friday.
[~amukherjee] As far as I can tell yes the review is done. Shall I go ahead and merge or is that down to one of [~jvennemann] or [~cwilliams]?
Just merged it, as both reviews passed.
Node Version: 6.10.1 NPM Version: 3.10.10 Mac OS: 10.12.4 Appc CLI: 6.2.2 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.1.0.GA Appcelerator Studio, build: 4.9.0.201705251638 Xcode 8.3.2 Hyperloop 2.1.1 I followed the steps in the description using the above environment, and confirmed that the reserved keyword error is not seen.