Leaf cannot find my template - Xcode 12 Vapor 4

1.7k Views Asked by At

I updated from Vapor 3 to 4, and Xcode 11 to 12. Now Leaf cannot find my *.leaf templates. I get a "noTemplateFile" error.

2

There are 2 best solutions below

0
On BEST ANSWER

I found the answer here: https://theswiftdev.com/how-to-create-your-first-website-using-vapor-4-and-leaf/

The trick was to add a "Custom Working Directory" in the scheme's options. I added my project's root directory and it worked.

0
On

Just modify your schema to be the directory for your Vapor server. Step by step guideline here https://docs.vapor.codes/4.0/xcode/