【问题标题】:Issue in deploying Vapor 3 beta app to Heroku using Swift 4.1使用 Swift 4.1 将 Vapor 3 beta 应用程序部署到 Heroku 的问题
【发布时间】:2018-08-02 08:30:31
【问题描述】:

我正在尝试使用 Vapor 3 beta 和 Swift 4.1 将新的蒸汽应用程序构建部署到 Heroku,但构建过程中经常失败。我尝试在其中添加带有4.1.swift-version 文件,但没有运气。

还尝试使用设置新的构建包 $ heroku buildpacks:set https://github.com/vapor-community/heroku-buildpack.git

$ vapor --version
Vapor Toolbox: 3.1.4
Vapor Framework: 3.0.0-beta.3.1.3`

这些是我在终端看到的日志

$ git push heroku master
Counting objects: 50, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (50/50), 12.55 KiB | 3.14 MiB/s, done.
Total 50 (delta 11), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Swift app detected
remote: -----> Installing clang 5.0.0
remote: -----> Installing swiftenv
remote: Cloning into 'swiftenv'...
remote: -----> Installing Swift 4.1
remote: We don't have build instructions for 4.1.
remote:  !     Push rejected, failed to compile Swift app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to serene-cliffs-74861.
remote: 
To https://git.heroku.com/serene-cliffs-74861.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/serene-cliffs-74861.git'`

在我的 heroku 应用程序中,我看到以下构建日志

-----> Swift app detected
-----> Installing clang 5.0.0
-----> Installing swiftenv
Cloning into 'swiftenv'...
-----> Installing Swift 4.1
We don't have build instructions for 4.1.
!     Push rejected, failed to compile Swift app.
!     Push failed`

谁能帮我解决这个问题。

【问题讨论】:

    标签: swift heroku vapor


    【解决方案1】:

    由于 Swift 4.1 目前尚未发布,您需要在 .swift-version 文件中指定开发快照。例如。: 4.1-DEVELOPMENT-SNAPSHOT-2018-03-01-a

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-05
      • 2011-10-03
      • 2016-07-24
      • 1970-01-01
      • 1970-01-01
      • 2016-12-05
      • 1970-01-01
      • 2020-06-24
      相关资源
      最近更新 更多