gatsbyjs / gatsby-source-wordpress-experimental

The upcoming v4 of gatsby-source-wordpress, currently in beta
MIT License
385 stars 100 forks source link

Fix: broken plugin options schema #433

Closed TylerBarnes closed 3 years ago

TylerBarnes commented 3 years ago

Well this was a hard one to figure out. Gatsby is using the deprecated version of Joi for which there are no docs. I had changed out plugin options schema to work with the latest joi version (not realizing Gatsby isn't using this) so I could generate our plugin options.. well this resulted in Gatsby swallowing the joi error somehow and the build crashing on something completely unrelated... I finally figured out what was causing it by trial and error (it was a default value in the joi schema that was a string where the actual field is not a string and latest joi allows examples that are strings where the deprecated Gatsby version only allows examples that are of the type of the field...

jasonbahl commented 3 years ago

Should rename this PR something punny. Like "oh the joi of silent failures"