【问题标题】:Hakyll tutorial goes wrongHakyll 教程出错了
【发布时间】:2019-11-27 14:55:38
【问题描述】:

我正在关注 https://jaspervdj.be/hakyll/tutorials/01-installation.html 中的 Hakyll 教程。

但似乎有些不对劲,我不知道是什么。当我运行“stack init”时,我会收到此消息。

Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./

Selecting the best among 16 snapshots...

* Partially matches lts-14.16
    hakyll not found
        - ourblog-com requires ==4.13.*

* Partially matches nightly-2019-11-25
    hakyll not found
        - ourblog-com requires ==4.13.*

* Partially matches lts-13.30
    hakyll not found
        - ourblog-com requires ==4.13.*

* Partially matches lts-12.26
    hakyll version 4.12.4.0 found
        - ourblog-com requires ==4.13.*

* Partially matches lts-11.22
    hakyll version 4.12.3.0 found
        - ourblog-com requires ==4.13.*

* Partially matches lts-10.10
    hakyll version 4.10.0.0 found
        - ourblog-com requires ==4.13.*

* Partially matches lts-9.21
    hakyll version 4.9.8.0 found
        - ourblog-com requires ==4.13.*

* Partially matches lts-8.24
    hakyll version 4.9.7.0 found
        - ourblog-com requires ==4.13.*

* Partially matches lts-7.24
    hakyll not found
        - ourblog-com requires ==4.13.*

* Partially matches lts-6.35
    hakyll version 4.8.3.2 found
        - ourblog-com requires ==4.13.*

...

* Partially matches lts-0.7
    hakyll not found
        - ourblog-com requires ==4.13.*

Selected resolver: lts-14.16
Resolver 'lts-14.16' does not have all the packages to match your requirements.
    hakyll not found
        - ourblog-com requires ==4.13.*

This may be resolved by:
    - Using '--omit-packages' to exclude mismatching package(s).
    - Using '--resolver' to specify a matching snapshot/resolver

我的路径似乎正确包含。为什么会这样?

【问题讨论】:

  • 选择的解析器:lts-14.16 解析器“lts-14.16”没有满足您要求的所有软件包。 hakyll 未找到 - ourblog-com 需要 ==4.13.*

标签: haskell haskell-stack hakyll


【解决方案1】:

Hakyll 维护人员似乎没有在 Stack 存储库中更新它。创建my-site 目录后,不要运行stack init,而是手动创建一个包含以下行的stack.yaml 文件:

resolver: lts-14.16
packages:
- .
extra-deps:
- hakyll-4.13.0.1

然后按照指示运行stack build 等。这似乎行得通。

【讨论】:

  • 我刚刚试了一下,得到了hakyll-4.13.0.1 from stack configuration does not match ==4.12.* (latest matching version is 4.12.5.2)
  • 这表明您的 my-site.cabal 文件包含依赖项 hakyll == 4.12.*,但是当我使用当前版本的 hakyll-init 创建一个新站点时,我的 my-site.cabal 副本包含最新日期依赖hakyll == 4.13.*。也许尝试重新运行 stack install hakyll 以确保您拥有最新版本,然后仔细检查您正在运行新安装的 hakyll-init 来创建您的网站,而不是一些陈旧的副本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-05-29
相关资源
最近更新 更多