You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgraded from 1.0.2 and getting this error on pnpm start
You’re trying to use a layout that does not exist: layout (undefined) (via Error)
> Running Dev Command “npx @11ty/eleventy --serve --watch --port $PORT”
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] You’re trying to use a layout that does not exist: layout (undefined) (via Error)
[11ty]
[11ty] Original error stack trace: Error: You’re trying to use a layout that does not exist: layout (undefined)
[11ty] at TemplateLayoutPathResolver.getFullPath (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:102:13)
[11ty] at new TemplateLayout (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateLayout.js:22:7)
[11ty] at Function.getTemplate (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateLayout.js:47:18)
[11ty] at TemplateLayout.getTemplateLayoutMap (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateLayout.js:93:35)
[11ty] at async TemplateLayout.getData (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateLayout.js:122:15)
[11ty] at async Template.getData (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/Template.js:383:26)
[11ty] at async TemplateMap.add (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateMap.js:64:16)
[11ty] at async Promise.all (index 10)
[11ty] at async TemplateWriter._createTemplateMap (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateWriter.js:257:5)
[11ty] at async TemplateWriter.generateTemplates (/Users/mehulkar/dev/my-web-site/node_modules/.pnpm/@11ty+eleventy@2.0.0-canary.20/node_modules/@11ty/eleventy/src/TemplateWriter.js:294:5)
I can debug further, but opening issue to see if a more helpful error message is possible here!
Reproduction steps
No response
Expected behavior
No response
Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered:
The issue was that I had layout: layout in frontmatter instead of layout: layout.njk. I'm guessing the extension is now required in 2.0. Is there a changelog / breaking change list I can contribute this to (if I'm understanding correctly)?
@zachleat fwiw, I’m on board with requiring extensions! Just didn’t know where to check to see the “breaking” changes so I could debug the error. One simple fix in my case would be to wrap the missing layout name in quotes in the error message. Would have made it more obvious that 11ty is looking for something I’ve named.
Operating system
macOS Ventura 13.0.1 (22A400)
Eleventy
2.0.0-canary.20
Describe the bug
Upgraded from 1.0.2 and getting this error on
pnpm start
You’re trying to use a layout that does not exist: layout (undefined) (via Error)
I can debug further, but opening issue to see if a more helpful error message is possible here!
Reproduction steps
No response
Expected behavior
No response
Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: