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

11ty crashes silently: doesn't output any files while not reporting any error. #1081

Closed
GerHobbelt opened this issue Apr 9, 2020 · 1 comment

Comments

@GerHobbelt
Copy link
Contributor

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:

Additional 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)

@zachleat
Copy link
Member

zachleat commented Dec 5, 2022

Looks like this was fixed, he says two years too late #1080 (comment)

@zachleat zachleat closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants