0

我想测试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

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

4

1 回答 1

0

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

.package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.3.0")),
于 2018-05-21T06:21:03.000 回答