设置远程代理进行构建时,Visual Studio Cordova iOS构建服务器设置失败

时间:2014-06-12 14:02:44

标签: ios bash visual-studio cordova visual-studio-cordova

我已按照此文档http://go.microsoft.com/fwlink/?LinkID=397716

安装了所有必需的软件

并在我的Mac上成功安装了vs-mda-remote。

尝试运行此命令时:vs-mda-remote --buildDir。

系统提示:-bash:vs-mda-remote:command not found

我试图关闭终端,甚至重新启动Mac,问题仍然存在。

请帮忙。

谢谢。


更新

进入vs-mda-remote并运行: bin / vs-mda-remote --buildDir xxx
适合我。

然而,当我尝试验证代理时,使用vs-mda-remote测试,我收到错误

BP13s-MacBook-Pro-3:vs-mda-remote mbp13$ bin/vs-mda-remote test Server: http://localhost:3000 buildUrl: http://localhost:3000/build/tasks?vcordova=3.4.1-0.1.0&cfg=release&command=build&options=--emulator

TypeError: Cannot read property 'statusCode' of undefined
    at Request._callback (/usr/local/share/npm/lib/node_modules/vs-mda-remote/test/selftest.js:64:56)
    at self.callback (/usr/local/share/npm/lib/node_modules/vs-mda-remote/node_modules/request/request.js:121:22)
    at Request.EventEmitter.emit (events.js:117:20)
    at ClientRequest.self.clientErrorHandler (/usr/local/share/npm/lib/node_modules/vs-mda-remote/node_modules/request/request.js:230:10)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at Socket.socketErrorListener (http.js:1547:9)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:440:14
    at process._tickCallback (node.js:419:13)

2 个答案:

答案 0 :(得分:1)

我看到了这个错误:

TypeError: Cannot read property 'statusCode' of undefined

确保在另一个终端窗口中运行构建代理。

答案 1 :(得分:0)

我遇到了同样的问题,不确定它是否与我使用apache cordova工具的CTP3更新到cordova 4.0.0有关?

要使vs-mda-remote -t​​est正常工作,我必须做的是将secure set设置为false:

vs-mda-remote --secure false

然后我不得不修改selftest.js文件,因为默认情况下尝试通过https访问。要做到这一点,请访问: /usr/local/share/npm/lib/node_modules/vs-mda-remote/test/selftest.js然后在第27行更改它,所以它说:

default('server', 'http://' + os.hostname() + ':3000').

然后重新运行:     vs-mda-remote -t​​est 在一个单独的终端窗口,它应该工作。