androidnode.jsappceleratorappcelerator-titaniumappcelerator-studio

Appcelerator : ERROR | Block-scoped declarations


I need help to solve this issue.
This Issue happen when I tried to build the app into an android phone.
I have tried to reinstall the whole Appcelerator along with the android-sdk, NodeJS, and Java but still having the same error.

[INFO] :   Alloy compiler completed successfully
2017-10-24T02:32:56.358Z | ERROR  | An uncaught exception was thrown!
Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
2017-10-24T02:32:56.367Z | ERROR  | Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
2017-10-24T02:32:56.367Z | TRACE  | SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at C:\ProgramData\Titanium\plugins\hyperloop\2.2.0\hooks\android\hyperloop.js:23:21
    at Object.<anonymous> (C:\ProgramData\Titanium\plugins\hyperloop\2.2.0\hooks\android\hyperloop.js:413:3)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at AndroidBuilder.<anonymous> (C:\ProgramData\Titanium\plugins\hyperloop\2.2.0\hooks\hyperloop.js:53:22)
---------------------------------------------
    at F:\Appc Test Workspace\helloworld\plugins\ti.alloy\hooks\alloy.js:171:11
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\lib\async.js:46:6
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3694:9
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:356:16
    at iteratorCallback (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:936:13)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:840:16
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3691:13
    at apply (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at F:\Appc Test Workspace\helloworld\plugins\ti.alloy\hooks\alloy.js:102:9
    at ChildProcess.exithandler (child_process.js:204:7)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:829:16)
---------------------------------------------
    at Object.exports.execFile (child_process.js:296:9)
    at exports.exec (child_process.js:111:18)
    at F:\Appc Test Workspace\helloworld\plugins\ti.alloy\hooks\alloy.js:99:7
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9
    at eachOfArrayLike (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:941:9)
    at eachOf (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:991:5)
    at _parallel (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3685:5)
    at Object.parallelLimit [as parallel] (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3765:3)
    at parallel (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\lib\async.js:45:8)
    at run (F:\Appc Test Workspace\helloworld\plugins\ti.alloy\hooks\alloy.js:88:4)
    at F:\Appc Test Workspace\helloworld\plugins\ti.alloy\hooks\alloy.js:192:3
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\lib\hook.js:235:13
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\async\dist\async.js:3845:9
    at replenish (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\async\dist\async.js:1030:17)
    at iterateeCallback (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\async\dist\async.js:1015:17)
---------------------------------------------
    at Object.exports.execFile (child_process.js:296:9)
    at exports.exec (child_process.js:111:18)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\lib\environ.js:267:3
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3694:9
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:356:16
    at replenish (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:877:25)
    at iterateeCallback (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:867:17)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:840:16
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3691:13
    at apply (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\lib\environ.js:261:7
    at ChildProcess.exithandler (child_process.js:204:7)
    at emitTwo (events.js:87:13)
---------------------------------------------
    at Object.exports.execFile (child_process.js:296:9)
    at exports.exec (child_process.js:111:18)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\lib\environ.js:255:6
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9
    at replenish (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:882:17)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:886:9
    at eachOfLimit (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:913:22)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:918:16
    at _parallel (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3685:5)
    at Object.series (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:4525:3)
    at Object.getOSInfo (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\lib\environ.js:223:8)
    at Function.logger.log.init (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\cli\commands\build.js:429:11)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\cli\commands\build.js:265:15
    at CLI.callCommandValidate (C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\lib\cli.js:720:7)
    at C:\Users\~\.appcelerator\install\6.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9
---------------------------------------------
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:2108:13
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:339:31
    at _insert (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:2216:13)
    at Object.q.push (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:2264:17)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\emulators\genymotion.js:129:12
    at Object.queue.drain (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\lib\subprocess.js:108:3)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2246:19
    at apply (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:20:25)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:840:16
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\lib\subprocess.js:92:6
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:3894:5
    at q.process (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2299:17)
    at Immediate.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2112:16)
---------------------------------------------
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2111:9
    at apply (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at _insert (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2220:9)
    at Object.q.push (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2267:13)
    at Object.findExecutable (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\node-appc\lib\subprocess.js:113:8)
    at async.parallel.virtualbox (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\emulators\genymotion.js:99:20)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:3671:13
    at replenish (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:884:21)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:888:13
    at eachOfLimit (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:915:26)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:920:20
    at eachOf (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:1052:9)
    at _parallel (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:3670:9)
    at Object.parallelLimit [as parallel] (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:3750:7)
---------------------------------------------
    at Socket.Readable.on (_stream_readable.js:680:33)
    at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:249:9)
    at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:492:9)
    at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:172:8)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:536:20)
---------------------------------------------
    at Socket.Readable.on (_stream_readable.js:680:33)
    at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:120:9)
    at ADB.shell (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:488:7)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:352:8
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:3671:13
    at replenish (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:884:21)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:888:13
    at eachOfLimit (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:915:26)
    at C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:920:20
    at _parallel (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:3670:9)
    at Object.series (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\async\dist\async.js:4496:7)
    at parseDevices (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:334:8)
    at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:408:3)
    at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA\node_modules\titanium-sdk\lib\adb.js:234:8)

.

Operating System
  Name                        = Microsoft Windows 10 Pro
  Version                     = 10.0.15063
  Architecture                = 32bit
  # CPUs                      = 4
  Memory                      = 21349625856
Node.js
  Node.js Version             = 4.6.0
  npm Version                 = 2.15.9
Titanium CLI
  CLI Version                 = 5.0.14
Titanium SDK
  SDK Version                 = 6.0.3.GA
  SDK Path                    = C:\ProgramData\Titanium\mobilesdk\win32\6.0.3.GA
  Target Platform             = android

The reason I am using NodeJS v 4.6.0 is because when I tried to upgrade the NodeJS and it will show me another error which is

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.

Solution

  • I believe this issue is happening because you are using Hyperloop module as shown in below screenshot.

    enter image description here

    If you need to use Hyperloop module, then try its lower versions as I am not sure this version was stable enough.

    OR

    If you do not need Hyperloop, then remove/disable it by removing its line from tiapp.xml -> modules node.

    Moreover, if you are not sure where this Hyperloop module came from, then create a new test app & notice that Hyperloop checkbox is present in one of the following dialogs when you create a new app using Studio.