Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24720] iOS: Error when using ES6 keywords with Hyperloop enabled

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-05-26T10:26:41.000+0000
Affected Version/sHyperloop 2.1.0
Fix Version/sHyperloop 2.1.1
ComponentsHyperloop
Labelshyperloop, titanium
ReporterBrenton House
AssigneeEwan Harris
Created2017-05-22T23:18:47.000+0000
Updated2017-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

FileDateSize
debug.log2017-05-23T12:07:07.000+0000206285

Comments

  1. Ewan Harris 2017-05-23

    [~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 version appc -v -o json Thanks!
  2. Brenton House 2017-05-23

    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.
  3. Brenton House 2017-05-23

    If it is of any help, the error seems to be coming from the nodent npm package.
  4. Ewan Harris 2017-05-23

    [~brentonhouse] Thanks for the tips! Moving this over to TIMOB so apologies for any email spam you might receive :)
  5. Hans Knöchel 2017-05-23

    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.
  6. Brenton House 2017-05-23

    I assume the issue with the --log-level flag is a separate issue and I should create a different ticket, correct?
  7. Ewan Harris 2017-05-23

    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 :)
  8. Brenton House 2017-05-23

    Thanks [~eharris]!
  9. Jan Vennemann 2017-05-23

    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.
  10. Abir Mukherjee 2017-05-26

    [~eharris] Is the review done on this one. Can it be merged? We're hoping to get 2.1.1 released Friday.
  11. Ewan Harris 2017-05-26

    [~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]?
  12. Hans Knöchel 2017-05-26

    Just merged it, as both reviews passed.
  13. Abir Mukherjee 2017-05-31

    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.

JSON Source