昨晚我尝试制作yesod快速入门指南,在步骤4上运行stack build
会产生错误
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
运行stack init
也会产生很大的大错误
对此有解决方案吗?
编辑:通过stack init
命令添加错误
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Selecting the best among 15 snapshots...
* Partially matches lts-13.21
aeson version 1.4.2.0 found
- edb-yesod requires >=0.6 && <1.4
classy-prelude version 1.5.0 found
- edb-yesod requires ==1.4.*
classy-prelude-conduit version 1.5.0 found
- edb-yesod requires ==1.4.*
classy-prelude-yesod version 1.5.0 found
- edb-yesod requires ==1.4.*
persistent version 2.9.2 found
- edb-yesod requires ==2.8.*
persistent-sqlite version 2.9.3 found
- edb-yesod requires ==2.8.*
yaml version 0.11.0.0 found
- edb-yesod requires ==0.8.*
Using package flags:
- edb-yesod: dev = False, library-only = False
Downloaded nightly-2019-05-18 build plan.
Unable to load cabal files for snapshot
----
Deleting cached snapshot file: /home/decapo/.stack/build-plan/nightly-2019-05-18.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/stackage-nightly/issues/new
----
Unable to parse cabal file for co-log-0.3.0.0@sha256:0eb5cf2598c3673f39a8e967a6a4f5043f4d1f1fcb50a844653c34fcf0cb068a,4508
- 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
从堆栈新的yesod-sqlite模板添加输出
» stack new my-project-du yesod-sqlite
Downloading template "yesod-sqlite" to create project "my-project-du" in my-project-du/ ...
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- my-project-du/
Selecting the best among 15 snapshots...
* Partially matches lts-13.21
aeson version 1.4.2.0 found
- my-project-du requires >=0.6 && <1.4
classy-prelude version 1.5.0 found
- my-project-du requires ==1.4.*
classy-prelude-conduit version 1.5.0 found
- my-project-du requires ==1.4.*
classy-prelude-yesod version 1.5.0 found
- my-project-du requires ==1.4.*
persistent version 2.9.2 found
- my-project-du requires ==2.8.*
persistent-sqlite version 2.9.3 found
- my-project-du requires ==2.8.*
yaml version 0.11.0.0 found
- my-project-du requires ==0.8.*
Using package flags:
- my-project-du: dev = False, library-only = False
Unable to load cabal files for snapshot
----
Deleting cached snapshot file: /home/decapo/.stack/build-plan/nightly-2019-05-18.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/stackage-nightly/issues/new
----
Unable to parse cabal file for co-log-0.3.0.0@sha256:0eb5cf2598c3673f39a8e967a6a4f5043f4d1f1fcb50a844653c34fcf0cb068a,4508
- 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
看起来类似于stack init命令。有关我的系统的详细信息,我正在运行ubuntu mate 18.04 64位。