【问题标题】:Visual Studio Cordova iOS build server setup failed at Setting up Remote Agent for BuildingVisual Studio Cordova iOS 构建服务器设置在为构建设置远程代理时失败
【发布时间】:2014-06-12 14:02:43
【问题描述】:

我已经按照这个文档http://go.microsoft.com/fwlink/?LinkID=397716安装了所有需要的软件

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

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

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

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

更新

cd 进入 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)

【问题讨论】:

  • 您能否验证您已执行stackoverflow.com/a/23667009/1277291 中提到的步骤。
  • 嗨@Priyank 你对另一篇文章的评论对我有用。 Franva - 尝试执行此操作时您在哪个目录中?我通常导航到 vs-mda-remote/ 并执行:bin/vs-mda-remote --buildDir xxxx。 – Priyank 然而,当我运行 /bin/vs-mda-remote 测试时,我得到 TypeError: Cannot read property 'statusCode' of undefined
  • 嗨@Priyank,请查看我的更新,谢谢

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


【解决方案1】:

我看到了这个错误:

TypeError: Cannot read property 'statusCode' of undefined

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

【讨论】:

  • 它尝试连接到localhost(您自己的计算机)上的端口 3000,并且只有在您在该端口上运行服务器时才能成功。
【解决方案2】:

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

要使 vs-mda-remote -t​​est 工作,我必须做的是从将安全设置为 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-远程测试 在一个单独的终端窗口中,它应该可以工作。

【讨论】:

    猜你喜欢
    • 2014-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-27
    • 1970-01-01
    • 2015-05-15
    • 1970-01-01
    相关资源
    最近更新 更多