Heroku上的Yesod:无法解析依赖关系,yesod-1.1.9.2

时间:2013-03-19 23:04:01

标签: heroku yesod

我使用yesod init创建了一个新应用程序,然后按照教程here将其部署到Heroku。

部署失败:

-----> Updating Cabal
Config file path source is default config file.
Config file /app//.cabal/config not found.
Writing default configuration to /app//.cabal/config
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install
-----> Release the hounds! Installing application
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: lol-0.0.0
trying: yesod-1.1.9.2
 !     Heroku push rejected, failed to compile Haskell app

To git@heroku.com:nameless-savannah-3054.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:nameless-savannah-3054.git'`

我的cabal文件只是yesod init生成的文件:

name:              lol
version:           0.0.0
cabal-version:     >= 1.8
build-type:        Simple

Flag dev
    Description:   Turn on development settings, like auto-reload templates.
    Default:       False

Flag library-only
    Description:   Build for use with "yesod devel"
    Default:       False

library
    exposed-modules: Application
                     Foundation
                     Import
                     Model
                     Settings
                     Settings.StaticFiles
                     Settings.Development
                     Handler.Home

    if flag(dev) || flag(library-only)
        cpp-options:   -DDEVELOPMENT
        ghc-options:   -Wall -O0
    else
        ghc-options:   -Wall -O2

    extensions: TemplateHaskell
                QuasiQuotes
                OverloadedStrings
                NoImplicitPrelude
                CPP
                MultiParamTypeClasses
                TypeFamilies
                GADTs
                GeneralizedNewtypeDeriving
                FlexibleContexts
                EmptyDataDecls
                NoMonomorphismRestriction

    build-depends: base                          >= 4          && < 5
                 -- , yesod-platform                >= 1.1        && < 1.2
                 , yesod                         >= 1.1.5      && < 1.2
                 , yesod-core                    >= 1.1.7      && < 1.2
                 , yesod-auth                    >= 1.1        && < 1.2
                 , yesod-static                  >= 1.1        && < 1.2
                 , yesod-default                 >= 1.1        && < 1.2
                 , yesod-form                    >= 1.1        && < 1.3
                 , clientsession                 >= 0.8        && < 0.9
                 , bytestring                    >= 0.9        && < 0.11
                 , text                          >= 0.11       && < 0.12
                 , persistent                    >= 1.1        && < 1.2
                 , persistent-sqlite             >= 1.1        && < 1.2
                 , persistent-template           >= 1.1.1      && < 1.2
                 , template-haskell
                 , hamlet                        >= 1.1        && < 1.2
                 , shakespeare-css               >= 1.0        && < 1.1
                 , shakespeare-js                >= 1.0.2      && < 1.2
                 , shakespeare-text              >= 1.0        && < 1.1
                 , hjsmin                        >= 0.1        && < 0.2
                 , monad-control                 >= 0.3        && < 0.4
                 , wai-extra                     >= 1.3        && < 1.4
                 , yaml                          >= 0.8        && < 0.9
                 , http-conduit                  >= 1.8        && < 1.10
                 , directory                     >= 1.1        && < 1.3
                 , warp                          >= 1.3        && < 1.4
                 , data-default
                 , aeson
                 , conduit                       >= 1.0
                 , monad-logger                  >= 0.3
                 , fast-logger                   >= 0.3

executable         lol
    if flag(library-only)
        Buildable: False

    main-is:           main.hs
    hs-source-dirs:    app
    build-depends:     base
                     , lol
                     , yesod-default

    ghc-options:       -threaded -O2

test-suite test
    type:              exitcode-stdio-1.0
    main-is:           main.hs
    hs-source-dirs:    tests
    ghc-options:       -Wall

    build-depends: base
                 , lol
                 , yesod-test >= 0.3 && < 0.4
                 , yesod-default
                 , yesod-core
                 , persistent
                 , persistent-sqlite
                 , resourcet
                 , monad-logger

关于原因的任何想法?

编辑:我还应该提一下,它在OS X上本地构建良好。

1 个答案:

答案 0 :(得分:1)

使用以下buildpack而不是教程中链接的那个,修复了问题:

https://github.com/ichistmeinname/heroku-buildpack-haskell