4

I am following the Hakyll tutorial as in this https://jaspervdj.be/hakyll/tutorials/01-installation.html.

But it seems that something is wrong and I can't tell what it is. When I run 'stack init' I get this message.

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

My path seems correctly included. Why is this happening?

Josh Cho
  • 87
  • 6
  • 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.* –  Nov 27 '19 at 15:28

1 Answers1

4

It looks like the Hakyll maintainers haven't kept it up to date in the Stack respository. After creating the my-site directory, instead of running stack init, create a stack.yaml file manually that contains the lines:

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

Then run stack build, etc. as directed. That seems to work.

K. A. Buhr
  • 45,621
  • 3
  • 45
  • 71
  • I just tried this and got `hakyll-4.13.0.1 from stack configuration does not match ==4.12.* (latest matching version is 4.12.5.2)` – peer Apr 22 '20 at 17:01
  • This suggests your `my-site.cabal` file contains the dependency `hakyll == 4.12.*`, but when I create a fresh site with the current version of `hakyll-init`, my copy of `my-site.cabal` contains the up-to-date dependency `hakyll == 4.13.*`. Maybe try to re-run `stack install hakyll` to make sure you have the most recent version and then double-check that you're running the newly installed `hakyll-init` to create your site, and not some stale copy. – K. A. Buhr Apr 22 '20 at 20:54