vapor - 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/
诀窍是在方案的选项中添加“自定义工作目录”。我添加了我的项目的根目录并且它有效。
推荐阅读
- stata - 生成新变量时忽略缺失值
- c# - “System.DateTime”不包含“Value”的定义,也没有接受第一个参数的扩展方法“Value”
- php - Mysqli stmt 绑定并执行失败
- python - 重塑 np 数组以进行深度学习
- python - 在 Pygame 1.9.4 中使用 move_ip
- javascript - 垃圾邮件注入链接的位置
- apache-flink - 使用 Kafka Connect 和 Flink 的实时流数据管道
- php - 在多维数组中搜索多个特定值
- android - 在 Activity 上下文之外调用 startActivity() 需要 FLAG_ACTIVITY_NEW_TASK
- docker - 使用卷挂载文件