2012-12-13 32 views
3

我對Haskell很新,我目前使用Windows 7操作系統。Windows 7上的Haskell Yesod:用'yesod devel'問題啓動開發服務器

我試圖開發一個使用Haskell框架Yesod的Web服務。當我執行yesod devel命令啓動開發服務器,我收到以下錯誤:

C:\Users\Sticky\workspace\Yesod\testYesod>yesod devel 
Yesod devel server. Press ENTER to quit 
Resolving dependencies... 
Configuring testYesod-0.0.0... 
cabal: At least the following dependencies are missing: 
data-default -any, 
hamlet ==1.1.*, 
hjsmin ==0.1.*, 
http-conduit >=1.5 && <1.7, 
monad-control ==0.3.*, 
persistent ==1.0.*, 
persistent-sqlite ==1.0.*, 
shakespeare-css ==1.0.*, 
shakespeare-js ==1.0.*, 
shakespeare-text ==1.0.*, 
wai-extra ==1.3.*, 
warp ==1.3.*, 
yaml ==0.8.*, 
yesod ==1.1.*, 
yesod-auth ==1.1.*, 
yesod-core >=1.1.2 && <1.2, 
yesod-default ==1.1.*, 
yesod-form ==1.1.*, 
yesod-static ==1.1.*, 
yesod-test ==0.3.* 
Rebuilding application... 
Forcing recompile for .\Model.hs because of config/models 
Forcing recompile for .\Foundation.hs because of config/routes 
Forcing recompile for .\Foundation.hs because of messages/en.msg 
Forcing recompile for .\Foundation.hs because of templates/default-layout-wrappe 
r.hamlet 
Forcing recompile for .\Foundation.hs because of templates/default-layout.hamlet 

Forcing recompile for .\Handler\Home.hs because of templates/homepage.hamlet 
cabal: Run the 'configure' command fBuild failure, pausing... 
irst. 

我試圖運行cabal configure,這似乎執行罰款,雖然我覺得我失去了一些東西,由於我沒有經驗,任何方向將不勝感激。我一直沒有找到任何相關的問題,但這又可能是由於我不知道我需要知道的內容:)

+1

嘗試'cabal install --only-dependencies'在您的項目目錄中。編輯:噢,在你做這個之前運行'cabal install happy alex'。 'hjsmin'至少需要'alex',不確定快樂但不能傷害。然後在運行第一條命令之前確保它們在您的路徑上。 – asm

+0

乾杯!工作就像一個魅力:D – stickybynature

回答

2

看起來您的項目的依賴關係未安裝。在您的項目目錄中運行以下命令:

# alex at least, possibly also happy, are required by hjsmin 
cabal install happy alex 
# Make sure alex is on your path, then 
cabal install --only-dependencies