本文介绍了Yesod ExitFailure 1安装脚手架应用程序时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我试图安装我的第一个脚手架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 我试着按照这里的说明操作: http://www.yesodweb.com/book/scaffolding-and-the-网站模板 无法找到有关此问题的任何信息。 解决方案错误消息表明 MonadLogger IO 实例丢失。问题是安装的 monad-logger 版本太新了。 monad-logger-0.2.4 包含您需要的实例, monad-logger-0.3.0 及以上显然不会 。 解决方案:添加&& < 0.3.0 到您的cabal文件中的 monad-logger 行并执行 cabal install --only-dependencies 再次。 (如果没有 monad-logger 行,添加一个如,monad-logger< 0.3.0 。 I'm trying to install my first scaffolded Yesod app. When I run 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) pIn 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.0cabal.exe: Error: some packages failed to install:testProject-0.0.0 failed during the building phase. The exception was:ExitFailure 1I've tried to follow the instructions here: http://www.yesodweb.com/book/scaffolding-and-the-site-templateHaven't managed to find any information regarding this problem. Any clues as to what's missing? 解决方案 The error message says that the 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.The solution:Add && < 0.3.0 to the monad-logger line in your cabal file and do cabal install --only-dependencies again.(If there is no monad-logger line, add one like , monad-logger < 0.3.0. 这篇关于Yesod ExitFailure 1安装脚手架应用程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-26 02:41