Appcelerator:错误|块作用域声明

Appcelerator : ERROR | Block-scoped declarations

我需要帮助来解决这个问题。
当我尝试将应用构建为 android phone 时,会发生此问题。
我尝试重新安装整个 Appcelerator 以及 android-sdk、NodeJS 和 Java,但仍然出现相同的错误。

[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.0\hooks\android\hyperloop.js:23:21
    at Object.<anonymous> (C:\ProgramData\Titanium\plugins\hyperloop.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.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.2.4\package\node_modules\titanium\node_modules\node-appc\lib\async.js:46:6
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3694:9
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:356:16
    at iteratorCallback (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:936:13)
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:840:16
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3691:13
    at apply (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
    at C:\Users\~\.appcelerator\install.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.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9
    at eachOfArrayLike (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:941:9)
    at eachOf (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:991:5)
    at _parallel (C:\Users\~\.appcelerator\install.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.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3765:3)
    at parallel (C:\Users\~\.appcelerator\install.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.2.4\package\node_modules\titanium\lib\hook.js:235:13
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\async\dist\async.js:3845:9
    at replenish (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\async\dist\async.js:1030:17)
    at iterateeCallback (C:\Users\~\.appcelerator\install.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.2.4\package\node_modules\titanium\node_modules\node-appc\lib\environ.js:267:3
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3694:9
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:356:16
    at replenish (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:877:25)
    at iterateeCallback (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:867:17)
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:840:16
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3691:13
    at apply (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at C:\Users\~\.appcelerator\install.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.2.4\package\node_modules\titanium\node_modules\node-appc\lib\environ.js:255:6
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9
    at replenish (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:882:17)
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:886:9
    at eachOfLimit (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:913:22)
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:918:16
    at _parallel (C:\Users\~\.appcelerator\install.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.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.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.0.3.GA\cli\commands\build.js:429:11)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\cli\commands\build.js:265:15
    at CLI.callCommandValidate (C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\lib\cli.js:720:7)
    at C:\Users\~\.appcelerator\install.2.4\package\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9
---------------------------------------------
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:2108:13
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:339:31
    at _insert (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:2216:13)
    at Object.q.push (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:2264:17)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\emulators\genymotion.js:129:12
    at Object.queue.drain (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\lib\subprocess.js:108:3)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2246:19
    at apply (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:20:25)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:840:16
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\lib\subprocess.js:92:6
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:3894:5
    at q.process (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2299:17)
    at Immediate.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2112:16)
---------------------------------------------
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2111:9
    at apply (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:56:12
    at _insert (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2220:9)
    at Object.q.push (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\node_modules\async\dist\async.js:2267:13)
    at Object.findExecutable (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\node-appc\lib\subprocess.js:113:8)
    at async.parallel.virtualbox (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\emulators\genymotion.js:99:20)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:3671:13
    at replenish (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:884:21)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:888:13
    at eachOfLimit (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:915:26)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:920:20
    at eachOf (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:1052:9)
    at _parallel (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:3670:9)
    at Object.parallelLimit [as parallel] (C:\ProgramData\Titanium\mobilesdk\win32.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.0.3.GA\node_modules\titanium-sdk\lib\adb.js:249:9)
    at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\adb.js:492:9)
    at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32.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.0.3.GA\node_modules\titanium-sdk\lib\adb.js:120:9)
    at ADB.shell (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\adb.js:488:7)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\adb.js:352:8
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:3671:13
    at replenish (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:884:21)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:888:13
    at eachOfLimit (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:915:26)
    at C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:920:20
    at _parallel (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:3670:9)
    at Object.series (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\async\dist\async.js:4496:7)
    at parseDevices (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\adb.js:334:8)
    at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32.0.3.GA\node_modules\titanium-sdk\lib\adb.js:408:3)
    at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32.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.0.3.GA
  Target Platform             = android

我使用 NodeJS v 4.6.0 的原因是当我尝试升级 NodeJS 时它会显示另一个错误

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.

我认为发生此问题是因为您正在使用 Hyperloop 模块,如下面的屏幕截图所示。

如果您需要使用 Hyperloop 模块,请尝试使用其较低版本,因为我不确定该版本是否足够稳定。

如果您不需要 Hyperloop,那么 remove/disable 通过从 tiapp.xml -> modules node 中删除它的行来 remove/disable 它。

此外,如果您不确定此 Hyperloop 模块来自何处,请创建一个新的测试应用程序并注意 Hyperloop 复选框当您使用 Studio.

创建新应用程序时,出现在以下对话框之一中