OGeek|极客世界-中国程序员成长平台

标题: ios - “管道中未处理的流错误”将 iOS 平台添加到 PhoneGap 3 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 14:39
标题: ios - “管道中未处理的流错误”将 iOS 平台添加到 PhoneGap 3

我正在尝试通过 CLI 构建一个新的 Phonegap 3.0 应用

当我执行时

phonegap run ios --V

我得到以下输出

[phonegap] detecting iOS SDK environment...
[phonegap] Checking iOS requirements...
[phonegap] Running "xcodebuild -version" (output to follow)
[phonegap] Xcode 5.0 Build version 5A1413
[phonegap] using the local environment
[phonegap] adding the iOS platform...
[warning] missing library cordova/ios/3.0.0
[phonegap] downloading https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=snapshot;h=3.0.0;sf=tgz...
[phonegap] Requesting {"uri":"https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=snapshot;h=3.0.0;sf=tgz"}...

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
Error: incorrect header check
    at Zlib._binding.onerror (zlib.js:295:17)

这还会导致在 ~/.cordova/lib/ios/cordova/3.0.0/创建一个空目录,这需要我在继续之前 rm -rf 相同,否则我会得到一个完全不同的错误......

在浏览器中调用相同的 URL 会导致 404。



Best Answer-推荐答案


问题似乎在于它是cordova lib的无效或损坏的url。

如果您不能等待它工作或 phonegap 库更新,您可以修改以下文件

<location to phonegap node module>/node_modules/cordova/platforms.js

将版本属性更改为 3.1.0-rc1,例如

{
parser : require('./src/metadata/ios_parser'),
url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git',
version: '3.1.0-rc1'
},

关于ios - “管道中未处理的流错误”将 iOS 平台添加到 PhoneGap 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18914134/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4