swift包管理器找不到KituraNet

时间:2018-05-20 17:39:38

标签: swift-package-manager kitura

我想测试Kitura,所以我做了

swift package init --type executable

我做了一个最小的Package.swift

import PackageDescription

let package = Package(
    name: "project2",
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.0.0")),
        .package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.7.1")),
        .package(url: "https://github.com/IBM-Swift/Kitura-StencilTemplateEngine", .upToNextMinor(from: "1.8.3"))
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "project2",
            dependencies: ["Kitura", "HeliumLogger", "KituraStencil"]),
        ]
)

当我运行swift build时,错误消息是

'Kitura' /Users/myname/Documents/myname/project2/.build/checkouts/Kitura.git-6522211175291160341: error: product dependency 'KituraNet' not found

我碰巧在工作时在桌面上做了​​同样的事情,一切都很好。有谁看到我在这里缺少的东西?

1 个答案:

答案 0 :(得分:0)

您的版本可能不匹配。尝试更新Kitura:

.package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.3.0")),