[TIMOB-25450] Hyperloop: iOS - Cannot run likely due to outdated dependency
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-11-15T17:40:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Hyperloop 2.2.2 |
Components | Hyperloop |
Labels | hyperloop |
Reporter | Jacob Budin |
Assignee | Jan Vennemann |
Created | 2017-10-27T20:45:41.000+0000 |
Updated | 2017-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.
Thanks for reporting this issue! When using Node 6 LTS, does the error occur as well?
I tried replacing my toolchain with Node.js v6.11.5 and receive the same error.
Is anyone else able to recreate this issue with Hyperloop using the most recent Titanium toolkit? If so, please post here.
[~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?
@jvennemann Confirmed. Hyperloop 2.2.2 resolves this issue. I appreciate it. Thanks.