Skip to content
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

No error is generated for an incorrectly spelled config filename. #3654

Open
JessyCatterwaul opened this issue Feb 10, 2025 · 1 comment
Open

Comments

@JessyCatterwaul
Copy link

JessyCatterwaul commented Feb 10, 2025

Is your feature request related to a problem? Please describe.

I'm a beginner to most of the technologies involved with Eleventy, and was following this tutorial: https://learn-eleventy.pages.dev/lesson/3/
I received errors when running npx eleventy --serve, that I did not understand.

I was helped by what seems to be an amazing Discord community. 😺
It turns out that I had just misspelled eleventy.js as elventy.js.

With eleventy not being a word that I'm all that familiar with looking at, that didn't register to my brain.

Describe the solution you'd like

I'm sorry, I don't know what is practical here. I just would have liked to have seen something automated that told me what the problem was, rather than

[11ty] 1. Problem creating an Eleventy Layout for the "./src/index.md" template file. (via EleventyBaseError)
[11ty] 2. You’re trying to use a layout that does not exist: _includes/layouts/home.html (via `layout: layouts/home.html`)

or

[11ty] 1. Having trouble rendering liquid template ./src/_includes/layouts/home.html (via TemplateContentRenderError)
[11ty] 2. tag "extends" not found, file:./src/_includes/layouts/home.html, line:1, col:1 (via ParseError)
[11ty] 3. tag "extends" not found (via AssertionError)

Describe alternatives you've considered

No response

Additional context

No response

@vrugtehagel
Copy link
Contributor

I agree that this is an issue, and I've seen some people running into issues creating a config file with a name that seems like it would work but doesn't (like .eleventy.mjs or .eleventy.cjs).

My suggestion is to generate a warning message if no configuration file was found at all - I suspect most Eleventy projects have one anyway. It's not ideal for projects that (intentionally) don't have one, but I'm guessing that such a message would save more headaches than it creates regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants