Gatsby builds fail when an image (that's not being used) is missing. #30928
Replies: 4 comments 2 replies
-
Hi! I'm sorry but I can't follow the reproduction steps as to how you get the error you're seeing. I'm also not sure if this is actually a Gatsby bug as images are only downloaded when they exist so maybe you request it somewhere else? The guide you're also following is a bit outdated (package version-wise) so you might also try it with Gatsby v3 and latest versions. Maybe reach out to the authors here? https://github.com/mariohernandez/gatsby_training |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm trying to upgrade to v3 from v2 and seeing similar behaviour, also using Drupal. Current working build, locally and in prod on v2 using the following packages:
But breaks when I upgrade to v3 packages
The following happens in console on the v3 packages when I run
|
Beta Was this translation helpful? Give feedback.
-
Okay, thanks both for the message! I assumed this was a local issue so I moved it. If you can provide a minimal reproduction please open a new issue in our issue tracker with a link to that. The training you linked and the other output of packages is a bit more than a minimal reproduction. This might be an issue with the Drupal source plugin, but to be sure we need to eliminate any other package that might cause this. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks @LekoArts, I'm trying to get a minimal repro working as easily as I can, as per your instruction, when I have it I'll open an issue. I did manage to reproduce it on a very basic starter in codepen so just need to get that shared. @mcmadeline I've found a workaround in the mean time which may or may not be helpful to you. In the e.g.
It's a bit cumbersome and will need managing every time an image field is added or changed in any of the content types in Drupal, but hopefully that wont be too frequent. Once I had in the exclude for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Gatsby builds fail when an image (that's not being used) is missing.
Steps to reproduce
Follow steps in this training material: https://app.gitbook.com/@mariohernandez/s/gatsby/
Expected result
Builds continue even if an image is missing and no longer in use.
Actual result
Builds fail when images are unused and deleted.
Environment
Beta Was this translation helpful? Give feedback.
All reactions