oleeskild / digitalgarden

261 stars 147 forks source link

Build Error: Input file contains unsupported image format #248

Open wchorski opened 5 months ago

wchorski commented 5 months ago

error log

I was having build errors in my github actions. So i cloned the repo on my local machine to run npm run build

...
[11ty] Writing dist/developer/emulation/game-emulation/index.html from ./src/site/notes/developer/emulation 👾/Game Emulation.md
[11ty] Writing dist/developer/emulation/pokemon-genning-create-a-mew-from-start-to-finish/index.html from ./src/site/notes/developer/emulation 👾/Pokémon Genning; Create a Mew from start to finish.md
[11ty] Writing dist/developer/css/toggle-checkbox-css/index.html from ./src/site/notes/developer/CSS/Toggle Checkbox CSS.md
[11ty] Writing dist/index.html from ./src/site/notes/index.md
[11ty] Unhandled rejection in promise: (more in DEBUG output)
[11ty] Input file contains unsupported image format (via Error)
[11ty] 
[11ty] Original error stack trace: Error: Input file contains unsupported image format
[11ty] Writing dist/developer/emulation/citra/index.html from ./src/site/notes/developer/emulation 👾/Citra.md
[11ty] Benchmark    454ms   9%   600× (Configuration) "link" Nunjucks Filter
[11ty] Copied 17 files / Wrote 283 files in 4.94 seconds (17.5ms each, v2.0.1)
ERROR: "build:eleventy" exited with 1.

From the error I assumed I might have had a link that referred to a non image, but the error message does not point to what file is causing the error. I assumed the above or below line housed the dirty link, but neither of those files link any image.

Trial and Error

I removed and added back in different files and folders into the src/site/notes/ folder to hunt and peck for the bad file. Turns out the file I was called iTunes XML Playlist to m3u Converter.md.

The problem being

The image was missing from my vault. Once I added that image back into my attachment folder things were good to go

Solution

Is there a way to print out the offending file name that is causing the error, or in this case continue with the build with a broken link instead of stopping the hole build?