钛-新版本

时间:2018-09-23 15:55:28

标签: titanium appcelerator appcelerator-titanium

2年前,我用Titanium创建了一个应用程序。我想开发一个新的,但是从一开始就行不通。 我刚刚将SDK更新为7.4.0GA,并且在控制台中运行命令“ ti create”时出现错误:

[ERROR] Failed to load command "create"
[ERROR] SyntaxError: Unexpected token ...

at Object.<anonymous> (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\exception.js:33:27)
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 Object.defineProperty.get (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\appc.js:63:11)
   
at ...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:2111:9
at apply (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:21:25)
at ...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:56:12
at _insert (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:2220:9)
at Object.q.push (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:2267:13)
at Object.findExecutable (...\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\subprocess.js:113:8)
at resolveNode (...\AppData\Roaming\npm\node_modules\titanium\lib\titanium.js:97:34)
at ...\AppData\Roaming\npm\node_modules\titanium\lib\titanium.js:74:5
at Object.<anonymous> (...\AppData\Roaming\npm\node_modules\titanium\lib\titanium.js:80:2)

我还尝试了SDK 7.3.1.GA

我该怎么办?

非常感谢:)

1 个答案:

答案 0 :(得分:1)

更新您的CLI工具。运行npm install -g titanum appcelerator alloyappc setup来检查环境。

之后,ti createappc ti create应该可以工作