Leaf 找不到我的模板 - Xcode 12 Vapor 4

Leaf cannot find my template - Xcode 12 Vapor 4

我从 Vapor 3 更新到 4,Xcode 从 11 更新到 12。现在 Leaf 找不到我的 *.leaf 模板。我收到“noTemplateFile”错误。

我在这里找到了答案:https://theswiftdev.com/how-to-create-your-first-website-using-vapor-4-and-leaf/

诀窍是在方案的选项中添加“自定义工作目录”。我添加了我的项目的根目录并且它起作用了。

只需将您的模式修改为您的 Vapor 服务器的目录。 分步指南在这里 https://docs.vapor.codes/4.0/xcode/