Leaf无法找到我的模板-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/