Titanium 安装完之后,还要 安装Alloy. 否则会 alloy compiler failed, cannot find module ...undefined.
访问量: 3174
今天就遇到了这个问题。 把代码clone到本地之后,想运行 $ ti build, 安装完各种 node module之后, 发现有下面的错误信息:
[INFO] Executing Alloy compile: /Users/apple/.nvm/v0.10.37/bin/node compile /workspace/geek_app/app --config platform=ios,version=0,simtype=none,devicefamily=iphone,deploytype=development,target=simulator [DEBUG] module.js:340 [DEBUG] throw err; [DEBUG] ^ [ERROR] : Cannot find module '/workspace/geek_app/undefined' [DEBUG] at Function.Module._resolveFilename (module.js:338:15) [DEBUG] at Function.Module._load (module.js:280:25) [DEBUG] at Function.Module.runMain (module.js:497:10) [DEBUG] at startup (node.js:119:16) [DEBUG] at node.js:935:3 [ERROR] Alloy compiler failed
仔细一看,这步是编译 alloy么,怎么命令不对。。。于是
$ npm install -g alloy
$ ti build ...
成功。