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
Some user configuration and developer mistakes, which cause the Template parts of the code to throw an error and make 11ty fail, are silently eaten and ignored.
Not even having the DEBUG output as per https://www.11ty.dev/docs/debugging/ was any help: the failure goes unmentioned there as well. When you start to trace through the code you'll discover that there's some inexplicable lack of subsequent debug(...) output for several input files.
The result then is 11ty reporting success and you staring at a completely empty output directory and going WTF?
To Reproduce
See #1080 for a deliberately introduced failure (an exception which is rethrown) which showcases the issue: without #1079, 11ty will crash silently thanks to a Promise without catch way up the call chain. (See also the #1079 and #1080 patch diffs.)
Expected behavior
The exception (any fatal failure in that code tree anyway) should have been caught an reported, so that the user has something to read and wonder about while the output is not generated due to user and/or dev error.
Ran into this while going through the code as I attempted to dig up what was going wrong with the local rig.
This kept me from discovering that at least one of my problems was some obscure stuff badly failing around permalinks as defined in a _data/layouts/template.11ty.js JavaScript layout template (following the spirit of https://www.11ty.dev/docs/languages/javascript/#permalink-function)
The text was updated successfully, but these errors were encountered:
Describe the bug
Some user configuration and developer mistakes, which cause the Template parts of the code to throw an error and make 11ty fail, are silently eaten and ignored.
Not even having the DEBUG output as per https://www.11ty.dev/docs/debugging/ was any help: the failure goes unmentioned there as well. When you start to trace through the code you'll discover that there's some inexplicable lack of subsequent
debug(...)
output for several input files.The result then is 11ty reporting success and you staring at a completely empty output directory and going WTF?
To Reproduce
See #1080 for a deliberately introduced failure (an exception which is rethrown) which showcases the issue: without #1079, 11ty will crash silently thanks to a Promise without
catch
way up the call chain. (See also the #1079 and #1080 patch diffs.)Expected behavior
The exception (any fatal failure in that code tree anyway) should have been caught an reported, so that the user has something to read and wonder about while the output is not generated due to user and/or dev error.
Environment:
npm i
version (0.10.0) as per today and also observed in themaster
branch commit which I forked the showcase and fix pullreqs off: fix silent crashes in 11ty #1079 and Showcase silent crash: this demos the type of crash fixed with pullreq #1079 #1080Additional context
Ran into this while going through the code as I attempted to dig up what was going wrong with the local rig.
This kept me from discovering that at least one of my problems was some obscure stuff badly failing around permalinks as defined in a
_data/layouts/template.11ty.js
JavaScript layout template (following the spirit of https://www.11ty.dev/docs/languages/javascript/#permalink-function)The text was updated successfully, but these errors were encountered: