Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(gatsby): Panic when root config is a function #16272
Not 100% sure if or where tests for this should be written, I could not find any other tests for bootstrap's index. I did use gatsby-dev to test that this change works however and it appears to do so.
Additionally, not sure if we want this panic to occur on configs that are still using experimental configs AND non experimental configs so it does it before loading either config.
When bootstrap loads the root config, throw a panic if the config is of type
Could you convert the error to be a structured error? E.g. #15619
We're switching all errors over and we shouldn't add new non-structured errors.
To convert it, you need to add an error entry to https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli/src/structured-errors/error-map.js and then reference that in the error object you pass into
Thanks! Can answer any questions you have. We need to create a doc page for this as well.
I can give it a shot
On Wed, Jul 31, 2019 at 4:48 PM, Anthony Powell < ***@***.*** > wrote: > > > Could you convert the error to be a structured error? E.g. #15619 ( > #15619 ) > > > > We're switching all errors over and we shouldn't add new non-structured > errors. > > > > To convert it, you need to add an error entry to https:/ / github. com/ gatsbyjs/ > gatsby/ blob/ master/ packages/ gatsby-cli/ src/ structured-errors/ error-map. > js ( > https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli/src/structured-errors/error-map.js > ) and then reference that in the error object you pass into report.panic. > > > > Thanks! Can answer any questions you have. We need to create a doc page > for this as well. > > I can give it a shot
The errors are pretty random actually :-D
Part of the goal of structured errors is that people can google the numbers and find something specific to the error. So it doesn't really matter what you pick as long as it isn't the same as another error and it isn't a "common" number e.g. 123456.
Incremented IDs tend to come up when someone is doing a PR converted unstructured errors and converts several together. There's no meaning otherwise.
Aug 1, 2019
18 checks passed
Holy buckets, @cephalization — we just merged your PR to Gatsby!
Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.