11ty / eleventy-plugin-rss

A pack of Eleventy plugins for generating an RSS feed.
https://www.11ty.dev/docs/plugins/rss/
MIT License
92 stars 22 forks source link

Sometimes error details aren’t displayed when build fails #7

Closed johnridesabike closed 3 years ago

johnridesabike commented 5 years ago

I was setting up an RSS feed and this error kept stopping my build: Unhandled rejection in promise: (more in DEBUG output) When I ran Eleventy in debug mode there wasn’t any additional information I could find.

After messing around with the code, I figured out that changing {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} to {{ post.templateContent }} gave a more helpful error message: ./feed/feed.njk contains a circular reference (using collections) to its own templateContent..

My educated guess (feel free to correct me) is that this is because I was using collections.all instead of a specific tag like collections.post, and the htmlToAbsoluteURls tag was somehow suppressing the error message.

(As a side note, is there a recommended way to make a feed for collections.all? eleventyExcludeFromCollections: true is already in my feed.njk template.)

zachleat commented 3 years ago

(Sorry for the late response) Since this one seems to predate a few big version releases to Eleventy core that improved our error handling (and some circular content reference bugs), I’m going to assume that it’s stale. Feel free to reopen if you retest and find that’s not true!