【问题标题】:Haskell Yesod problemsHaskell Yesod 问题
【发布时间】:2018-04-27 17:57:39
【问题描述】:

有人可以帮助我吗?!我在 C9 工作区的大学 Haskell Yesod 网站上工作,我已经通过命令 Yesod 安装并更新了 cabal,但是当我尝试“stack build”命令时,会出现这个可悲的错误消息:

 $ stack build

aulahaskell-0.0.0: build (lib + exe)
Preprocessing library aulahaskell-0.0.0...
[ 7 of 13] Compiling Handler.Cliente  ( src/Handler/Cliente.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Cliente.o )

/home/ubuntu/workspace/web2017/src/Handler/Cliente.hs:10:1: error:
    Failed to load interface for ‘Network.HTTP.Types.Status’
    It is a member of the hidden package ‘http-types-0.9.1’.
    Perhaps you need to add ‘http-types’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

--  While building package aulahaskell-0.0.0 using:
      /home/ubuntu/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 build lib:aulahaskell exe:aulahaskell --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1

说真的,我尝试了很多方法来修复它,但没有任何效果=S

【问题讨论】:

    标签: linux haskell yesod c9.io hamlet


    【解决方案1】:

    请仔细阅读错误信息:

    Failed to load interface for ‘Network.HTTP.Types.Status’
    It is a member of the hidden package ‘http-types-0.9.1’.
    Perhaps you need to add ‘http-types’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
    

    Perhaps you need to add 'http-types' to the build-depends in your .cabal 文件这行告诉你该怎么做:你必须添加 http-types 到 cabal 文件中库 aulahaskellbuild-depends: 部分。

    如果这没有帮助,请发布您的 cabal 文件。

    【讨论】:

      【解决方案2】:

      您是如何开始 yesod 项目的?建议这样做:

      stack new my-yesod-project yesod-(your database here)
      cd my-yesod-project
      stack build
      

      【讨论】:

        【解决方案3】:

        谢谢你们!这是我如何启动项目的问题,我的工作空间中没有安装一些文件,所以我删除了文件,重新安装 Yesod 和 cabal,按照以下步骤创建另一个新版本:https://www.yesodweb.com/page/quickstart

        【讨论】:

          猜你喜欢
          • 2013-11-14
          • 1970-01-01
          • 1970-01-01
          • 2021-08-22
          • 1970-01-01
          • 2016-04-14
          • 2015-04-26
          • 2017-05-14
          • 1970-01-01
          相关资源
          最近更新 更多