Stack init failed
ksnxr opened this issue · 2 comments
ksnxr commented
I cloned the repository and ran stack init
, but the initialization failed.
❯ stack init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- exercises/
Selecting the best among 21 snapshots...
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/8.yaml
ghc-9.0.2 cannot be used for these packages:
- tests
base version 4.15.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.17.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/5/20.yaml
ghc-9.2.2 cannot be used for these packages:
- tests
base version 4.16.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.18.0.0 found
- tests requires ==2.16.0.0
* Partially matches https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
JuicyPixels version 3.3.7 found
- tests requires ==3.3.6
warp version 3.3.20 found
- tests requires ==3.3.18
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/15.yaml
ghc-8.10.4 cannot be used for these packages:
- tests
base version 4.14.1.0 found
- tests requires ==4.14.3.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml
ghc-8.8.4 cannot be used for these packages:
- tests
base version 4.13.0.0 found
- tests requires ==4.14.3.0
template-haskell version 2.15.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/16.yaml
ghc-8.8.3 cannot be used for these packages:
- tests
base version 4.13.0.0 found
- tests requires ==4.14.3.0
template-haskell version 2.15.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
ghc-8.6.5 cannot be used for these packages:
- tests
base version 4.12.0.0 found
- tests requires ==4.14.3.0
template-haskell version 2.14.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/30.yaml
ghc-8.6.5 cannot be used for these packages:
- tests
base version 4.12.0.0 found
- tests requires ==4.14.3.0
template-haskell version 2.14.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/26.yaml
ghc-8.4.4 cannot be used for these packages:
- tests
base version 4.11.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.13.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/22.yaml
ghc-8.2.2 cannot be used for these packages:
- tests
base version 4.10.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.12.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/10/10.yaml
ghc-8.2.2 cannot be used for these packages:
- tests
base version 4.10.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.12.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/9/21.yaml
ghc-8.0.2 cannot be used for these packages:
- tests
base version 4.9.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.11.1.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/8/24.yaml
ghc-8.0.2 cannot be used for these packages:
- tests
base version 4.9.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.11.1.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/7/24.yaml
ghc-8.0.1 cannot be used for these packages:
- tests
base version 4.9.0.0 found
- tests requires ==4.14.3.0
template-haskell version 2.11.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/6/35.yaml
ghc-7.10.3 cannot be used for these packages:
- tests
base version 4.8.2.0 found
- tests requires ==4.14.3.0
template-haskell version 2.10.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/5/18.yaml
ghc-7.10.3 cannot be used for these packages:
- tests
base version 4.8.2.0 found
- tests requires ==4.14.3.0
template-haskell version 2.10.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/4/2.yaml
ghc-7.10.3 cannot be used for these packages:
- tests
base version 4.8.2.0 found
- tests requires ==4.14.3.0
template-haskell version 2.10.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/3/22.yaml
ghc-7.10.2 cannot be used for these packages:
- tests
base version 4.8.1.0 found
- tests requires ==4.14.3.0
template-haskell version 2.10.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/2/22.yaml
ghc-7.8.4 cannot be used for these packages:
- tests
base version 4.7.0.2 found
- tests requires ==4.14.3.0
template-haskell version 2.9.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/1/15.yaml
ghc-7.8.4 cannot be used for these packages:
- tests
base version 4.7.0.2 found
- tests requires ==4.14.3.0
template-haskell version 2.9.0.0 found
- tests requires ==2.16.0.0
* Rejected https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/0/7.yaml
ghc-7.8.3 cannot be used for these packages:
- tests
base version 4.7.0.1 found
- tests requires ==4.14.3.0
template-haskell version 2.9.0.0 found
- tests requires ==2.16.0.0
Selected resolver: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
Resolver 'https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml' does not have all the packages to match your requirements.
JuicyPixels version 3.3.7 found
- tests requires ==3.3.6
warp version 3.3.20 found
- tests requires ==3.3.18
This may be resolved by:
- Using '--omit-packages' to exclude mismatching package(s).
- Using '--resolver' to specify a matching snapshot/resolver
I am using M1 Mac, OS 12.3.1, Stack version 2.7.5. Does anyone know how to fix this?
opqdonut commented
In case someone else comes here looking for a solution, the right command is stack build
, not stack init
.
adueck commented
Also the important part is to follow the instructions by first going into the exercises directory (cd exercises
) and then doing stack build
. I made the mistake of trying stack build
, stack init
in the root directory of the repo and I had to start over to get it to work.