-
-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing layout error should report the problem template file #727
Comments
Could you provide a minimal working example? |
@Ryuno-Ki sure! Editing the You can run Or check locally:
Output (summary)
Preferred output could look like:
|
Confirmed this as still valid.
|
I just started getting this error when upgrading to
I totally appreciate the nature of a canary release, and I accept all the risk of using an "unstable" release in production. I'm happy to refactor my source code to accommodate an upstream breaking change if there is one... either way, just wanted to share this as another case of the error identified in this issue. |
@paulshryock Possibly related to #1924 (assuming "base" isn't a layout alias; although I didn't remember seeing that alias in your /docs/eleventy.config.js file). |
Agree with @pdehaan. Maybe if there is no layout found and the layout name doesn’t have an extension, Eleventy should perform the lookup anyway and report the suggested layout name in the error message? |
https://www.11ty.dev/docs/layouts/#omitting-the-layouts-file-extension has more context and a way to reenable layout resolution (and why it probably isn't a good idea). |
Shipping with 3.0.0-alpha.17 |
When there is an error writing templates, it would be helpful to print the affected file.
I got this error 'You’re trying to use a layout that does not exist' and the missing template name, but it didn't print the file it was trying to render (that I could see).
The text was updated successfully, but these errors were encountered: