yesod - Yesod 快速入门在堆栈构建时失败
问题描述
我昨晚尝试做 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.
编辑 2
从堆栈新的 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 位。
解决方案
推荐阅读
- python-3.x - 无法在 AWS Elastic Beanstalk 上安装 pycurl==7.43.0.5
- amazon-web-services - aws ubuntu 实例无法连接到 bitbucket.org 端口 443:连接超时
- orbeon - Orbeon 表单 - 获取下拉列表的标签
- r - 在 RStudio 脚本中自动插入空格
- azure-devops - 从另一个管道管理 CI/CD 管道 - Azure Devops
- julia - 如何用 julia 创建输出 csv?
- node.js - 安装了节点和 npm,但 Git bash 无法识别“npm run dev”中的“节点”(其他 shell 工作正常)
- elasticsearch - ES 7.7 加入集群失败,因为超时
- c++ - Windows Form C++ 可以从文件夹中读取图像并进行处理吗?
- java - 有没有办法控制詹金斯失败的原因?(由于 Maven 插件问题而失败)