Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25450] Hyperloop: iOS - Cannot run likely due to outdated dependency

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-11-15T17:40:21.000+0000
Affected Version/sn/a
Fix Version/sHyperloop 2.2.2
ComponentsHyperloop
Labelshyperloop
ReporterJacob Budin
AssigneeJan Vennemann
Created2017-10-27T20:45:41.000+0000
Updated2017-11-15T17:40:21.000+0000

Description

I'm attempting to enable Hyperloop in an existing Titanium iOS project. I couldn't find documentation on how to do this via the CLI, so I did enabled it using Appcelerator Studio. Enabling it there, it added the Hyperloop module and the plugin to the project's tiapp.xml. On building the project, now with Hyperloop, this error appears:
[INFO]  Alloy compiler completed successfully
[TRACE] Starting third-party framework detection
[TRACE] Scanning /Users/jacobbudin/Sites/madlibs-ios/platforms/titanium/madlibs/platform/ios for frameworks
(node:46624) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token ]
I suspect the cause of this error is this file and line in Hyperloop plugin: hyperloop/2.2.1/hooks/ios/node_modules/acorn/dist/acorn.js:3339:
$ node hyperloop.js 
/Users/somebody/Library/Application Support/Titanium/plugins/hyperloop/2.2.1/hooks/ios/node_modules/acorn/dist/acorn.js:3339
},{}]]]]]]]]]]]]]]]]]
     ^

SyntaxError: Unexpected token ]
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:588:28)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/somebody/Library/Application Support/Titanium/plugins/hyperloop/2.2.1/hooks/ios/node_modules/hyperloop-metabase/lib/generate/custom.js:5:13)
My initial suspicion is that the acorn module is no longer compatible with more modern versions of Node.js. The acorn module installed is version 2.7.0 (released [January 2016](https://github.com/ternjs/acorn/releases/tag/2.7.0)) whereas [the most recent release is 5.1.2](https://www.npmjs.com/package/acorn). I could not find instructions on updating Hyperloop manually. I believe Hyperloop 2.2.1 to be the most recent version publicly available.

Comments

  1. Hans Knöchel 2017-10-28

    Thanks for reporting this issue! When using Node 6 LTS, does the error occur as well?
  2. Jacob Budin 2017-10-30

    I tried replacing my toolchain with Node.js v6.11.5 and receive the same error.
       $ node -v
       v6.11.5
       $ node hyperloop.js 
       /Users/somebody/Library/Application Support/Titanium/plugins/hyperloop/2.2.1/hooks/ios/node_modules/acorn/dist/acorn.js:3339
       },{}]]]]]]]]]]]]]]]]]
            ^
       
       SyntaxError: Unexpected token ]
           at createScript (vm.js:56:10)
           at Object.runInThisContext (vm.js:97:10)
           at Module._compile (module.js:542:28)
           at Object.Module._extensions..js (module.js:579:10)
           at Module.load (module.js:487:32)
           at tryModuleLoad (module.js:446:12)
           at Function.Module._load (module.js:438:3)
           at Module.require (module.js:497:17)
           at require (internal/module.js:20:19)
           at Object.<anonymous> (/Users/jacobbudin/Library/Application Support/Titanium/plugins/hyperloop/2.2.1/hooks/ios/node_modules/hyperloop-metabase/lib/generate/custom.js:5:13)
       
  3. Jacob Budin 2017-11-09

    Is anyone else able to recreate this issue with Hyperloop using the most recent Titanium toolkit? If so, please post here.
  4. Jan Vennemann 2017-11-15

    [~jacobkettle], this was caused by a corrupted Hyperloop 2.2.1 distribution zip and was fixed with Hyperloop 2.2.2. Did you check with the updated version?
  5. Jacob Budin 2017-11-15

    @jvennemann Confirmed. Hyperloop 2.2.2 resolves this issue. I appreciate it. Thanks.

JSON Source