我试图使用Vapor (https://github.com/vapor-community/heroku-buildpack/tree/master)将一个Swift包推到Heroku,但我一直收到以下错误:
error: terminated(1): /app/tmp/cache/heroku-18/swiftenv/versions/4.2/usr/bin/swift-build-tool -f /tmp/build_1041959f11306dce64ad9d4712e1d962/.build/debug.yaml main output:
我使用SWIFT5.2编写了这个包,但Heroku坚持使用SWIFT4.2。我已经确认了buildpack与SWIFT5.2兼容,我已经将. Swift文件设置为5.2,以及我的Package.swift文件的第一行。
下面是Package.swift文件:
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "TurnipBot",
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/Azoy/Sword", .branch("master"))
],
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: "TurnipBot",
dependencies: ["Sword"]),
.testTarget(
name: "TurnipBotTests",
dependencies: ["TurnipBot"]),
]
)发布于 2020-04-02 13:50:20
您确实提交了.swift-version文件吗?拼写对不对等等?我在我的一个应用程序中使用过它,部署得很好
https://stackoverflow.com/questions/60979749
复制相似问题