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
[11ty] Problem writing Eleventy templates: (more in DEBUG output) [11ty] 1. Having trouble writing to "out/og/node/lorum.png" from "./src/og.11ty.js" (via EleventyTemplateError)
[11ty] 2. Transform `html` encountered an error when transforming ./src/og.11ty.js. (via EleventyTransformError)
Modifying 11ty source code for the second error to report the output shows the real output file:
}catch(e){thrownewEleventyTransformError(`Transform \`${name}\` encountered an error when transforming ${inputPath} into "${outputPath}"`,e,);}
1. Having trouble writing to "out/og/node/lorum.png" from "./src/og.11ty.js" (via EleventyTemplateError)
2. Transform 'htmlmin' encountered an error when transforming ./src/og.11ty.js into "out/og/index.html". (via EleventyTransformError)
So why is it incorrect in the first error?
Because, the way 11ty works is it internally makes a queue of all the templates that need to be transformed. Because most templates are the actual content, this usually works, but pagination is one template making many output files. There was a hack employeed, where the first file that will be outputted is set as the output file for use in error messages to avoid breaking other code:
for(letpageofmap._pages){// Copy outputPath to map entryif(!map.outputPath){map.outputPath=page.outputPath;}}
But, this means that I’m being told false information! And, without modifying 11ty source, there’s no good way to get correct information! No wonder I was confused!
v3.0.0-alpha.4
I have a writeup here: https://boehs.org/node/investigating-a-11ty-race-condition
A portion of the post has been copied below:
This error is incorrect:
Modifying 11ty source code for the second error to report the output shows the real output file:
So why is it incorrect in the first error?
Because, the way 11ty works is it internally makes a queue of all the templates that need to be transformed. Because most templates are the actual content, this usually works, but pagination is one template making many output files. There was a hack employeed, where the first file that will be outputted is set as the output file for use in error messages to avoid breaking other code:
But, this means that I’m being told false information! And, without modifying 11ty source, there’s no good way to get correct information! No wonder I was confused!
Zach, I wrote it another way in your discord DMs
Discussion in the 11ty discord here: https://discord.com/channels/741017160297611315/1201882327509368892
The text was updated successfully, but these errors were encountered: