yesod init command does not work on Windows

我怕爱的太早我们不能终老 提交于 2019-12-11 05:06:47

问题


I did the following steps to install the Yesod web framework.

mkdir mypackage
cd mypackage
cabal update
cabal sandbox init
cabal install yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals

When I then tried to do yesod init, I got an error message.

'yesod' is not recognized as an internal or external command, operable program or batch file.

I used search to find any yesod-like file but I couldn't find any yesod.exe or anything like that. I have searched the entire C: drive.

What happened to the yesod command?


回答1:


The yesod.exe file should be in mypackage/.cabal-sandbox/bin/yesod.exe.. If its not there, try to install yesod-bin again. This directory is not added to the path so the windows command line cannot find yesod.exe. Try this from a command line in the mypackage directory:

.cabal-sandbox\bin\yesod init

You will have the same problem when you want to run the development server. I solve this on my windows pc by creating a file called devel.bat in the project directory with the following contents:

set PATH=%PATH%;%CD%\.cabal-sandbox\bin
yesod devel

Then run the file to start the development server.




回答2:


Yesod init is disabled and you have to use the stack.Please refer this https://www.yesodweb.com/page/quickstart



来源:https://stackoverflow.com/questions/24671225/yesod-init-command-does-not-work-on-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!