-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
11ty's error messages for failed plugins are not helpful #646
Comments
Related to #547? |
Just as a quick note, I believe |
Finally getting back to this. Errors triggering from transforms will now look like this starting in 1.0.1. If you’d like me to provide better error messaging around other features, please let me know!
|
Also pushing another improvement here for plugin execution specifically (the original error was a transform error but it sounds like @surma wanted better messaging around plugins too) Specifically: // .eleventy.js
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin({
configFunction: function myPluginName(eleventyConfig) {
throw Error("Oh no my plugin failed");
}
});
}; will now throw an error like this:
Note that we’ll use |
Describe the bug
If a plugin throws (or returns a rejected promise), the error message contains no information about which plugin is throwing and where the throw happened.
To Reproduce
Create a new 11ty project with just a README and put this in your
.eleventy.js
:Running
eleventy
yields:Running
DEBUG=1 eleventy
yields less useful information, imo:Expected behavior
A clear and concise description of
what you expected to happenwhich plugin failed and where it threw.Environment:
Additional context
On my personal blog I have a more complex plugin that is located in its own file. For some reason, the output becomes even more cryptic:
The text was updated successfully, but these errors were encountered: