Yesod ExitFailure 1安装脚手架应用程序时 [英] Yesod ExitFailure 1 when installing scaffolded app
问题描述
我试图安装我的第一个脚手架Yesod应用程序。当我运行 cabal-dev install&& yesod --dev devel
它与ExitFailure失败1.我使用sqlite进行持久化。
Application.hs:49:44:
由于使用`runMigration'导致没有(monad-logger-0.3.1:Control.Monad.Logger.MonadLogger
IO)
的实例
可能的修正:
为
添加实例声明(monad-logger-0.3.1:Control.Monad.Logger.MonadLogger IO)
在Database.Persist的第二个参数.Store.runPool',即
`(runMigration migrateAll)'
在'do'块的标记中:
Database.Persist.Store.runPool dbconf(runMigration migrateAll)p
在表达式中:
do {manager< - newManager def;
s< - staticSite;
dbconf< - withYamlEnvironment
config / sqlite.yml(appEnv conf)Database.Persist.Store.loadConfig
>> = Database.Persist.Store.applyEnv;
p< - Database.Persist.Store.createPoolConfig
(dbconf :: PersistConfig);
....}
未能安装testProject-0.0.0
cabal.exe:错误:某些程序包未能安装:
testProject-0.0.0在建筑物内失败相。例外情况是:
ExitFailure 1
我试着按照这里的说明操作:< a href =http://www.yesodweb.com/book/scaffolding-and-the-site-template =noreferrer> http://www.yesodweb.com/book/scaffolding-and-the-网站模板
无法找到有关此问题的任何信息。
错误消息表明 MonadLogger IO
实例丢失。问题是安装的 monad-logger
版本太新了。 monad-logger-0.2.4
包含您需要的实例, monad-logger-0.3.0
及以上显然不会 。
解决方案: (如果没有 I'm trying to install my first scaffolded Yesod app. When I run I've tried to follow the instructions here: http://www.yesodweb.com/book/scaffolding-and-the-site-template
Haven't managed to find any information regarding this problem. Any clues as to what's missing? The error message says that the The solution:
Add (If there is no 这篇关于Yesod ExitFailure 1安装脚手架应用程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
添加&& < 0.3.0
到您的cabal文件中的 monad-logger
行并执行 cabal install --only-dependencies
再次。
monad-logger
行,添加一个如,monad-logger< 0.3.0
。cabal-dev install && yesod --dev devel
it fails with ExitFailure 1. I'm using sqlite for persistent.Application.hs:49:44:
No instance for (monad-logger-0.3.1:Control.Monad.Logger.MonadLogger
IO)
arising from a use of `runMigration'
Possible fix:
add an instance declaration for
(monad-logger-0.3.1:Control.Monad.Logger.MonadLogger IO)
In the second argument of `Database.Persist.Store.runPool', namely
`(runMigration migrateAll)'
In a stmt of a 'do' block:
Database.Persist.Store.runPool dbconf (runMigration migrateAll) p
In the expression:
do { manager <- newManager def;
s <- staticSite;
dbconf <- withYamlEnvironment
"config/sqlite.yml" (appEnv conf) Database.Persist.Store.loadConfig
>>= Database.Persist.Store.applyEnv;
p <- Database.Persist.Store.createPoolConfig
(dbconf :: PersistConfig);
.... }
Failed to install testProject-0.0.0
cabal.exe: Error: some packages failed to install:
testProject-0.0.0 failed during the building phase. The exception was:
ExitFailure 1
MonadLogger IO
instance is missing. The problem is that the installed version of monad-logger
is too new. monad-logger-0.2.4
includes the instance you need, monad-logger-0.3.0
and above apparently don't.&& < 0.3.0
to the monad-logger
line in your cabal file and do cabal install --only-dependencies
again.monad-logger
line, add one like , monad-logger < 0.3.0
.