Appcelerator: ОШИБКА | Блочные декларации

Мне нужна помощь, чтобы решить эту проблему.
Эта проблема произошла, когда я пытался встроить приложение в телефон Android.
Я попытался переустановить весь 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.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

Причина, по которой я использую NodeJS v 4.6.0, заключается в том, что при попытке обновить NodeJS мне будет показана другая ошибка, которая

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.

1 ответ

Решение

Я считаю, что эта проблема происходит, потому что вы используете модуль Hyperloop, как показано на скриншоте ниже.

Если вам нужно использовать модуль Hyperloop, попробуйте его более низкие версии, так как я не уверен, что эта версия была достаточно стабильной.

ИЛИ ЖЕ

Если вам не нужен Hyperloop, то удалите / отключите его, удалив его строку изtiapp.xml -> modules node,

Более того, если вы не уверены, откуда появился этот модуль Hyperloop, создайте новое тестовое приложение и обратите внимание, что флажок Hyperloop присутствует в одном из следующих диалоговых окон при создании нового приложения с помощью Studio.

Другие вопросы по тегам