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
{{ message }}
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
When running gatsby build, one of the page creations is sending a data object of null. I checked to see if this was by design, and I believe it's not. This is related to preview pages. I've turned off previews, but this page is still created. I'm able to prevent the error by ignoring the null case, but that doesn't explain why this is happening. Also, this issue does not happen in gatsby develop.
If the config says, previews: false, then why would the plugin still try to generate a previews path?
When looking at the output generated by "./src/components/blog-post.tsx" during gatsby build, I see that my react code runs into a null case on the first-page creation. All subsequent page creations seem to run correctly, that too for content that I expect. Also, why isn't this issue occurring for gatsby develop?
Here are the props for the page creation that is returning an odd data object.
{"path": "/*","*": "preview/blog_post",// <-- Why I suspect this is related to previews"uri": "/","location": {"pathname": "/preview/blog_post","search": "","hash": ""},"data": {"prismic": {"blog_post": null// <-- This isn't null for my expected content}},"pageContext": {"rootQuery": null,"id": "","uid": "","lang": "en-us","paginationPreviousUid": "","paginationPreviousLang": "","paginationNextUid": "","paginationNextLang": ""},"pathContext": {"rootQuery": null,"id": "","uid": "","lang": "en-us","paginationPreviousUid": "","paginationPreviousLang": "","paginationNextUid": "","paginationNextLang": ""}}
This might be similar to #211. I created a separate issue in case the root causes are different.
As a side, I also tried to debug this myself using VSCode and breakpoints. I'm a little newer to debugging Gatsby plugins, so I wasn't successful. Any suggestions on how I could see the logs/execution of the plugin would be appreciated!
The text was updated successfully, but these errors were encountered:
When running
gatsby build
, one of the page creations is sending a data object ofnull
. I checked to see if this was by design, and I believe it's not. This is related to preview pages. I've turned off previews, but this page is still created. I'm able to prevent the error by ignoring thenull
case, but that doesn't explain why this is happening. Also, this issue does not happen ingatsby develop
.If the config says,
previews: false
, then why would the plugin still try to generate a previews path?gatsby-config.js:
When looking at the output generated by
"./src/components/blog-post.tsx"
duringgatsby build
, I see that my react code runs into anull
case on the first-page creation. All subsequent page creations seem to run correctly, that too for content that I expect. Also, why isn't this issue occurring forgatsby develop
?Here are the props for the page creation that is returning an odd
data
object.This might be similar to #211. I created a separate issue in case the root causes are different.
As a side, I also tried to debug this myself using VSCode and breakpoints. I'm a little newer to debugging Gatsby plugins, so I wasn't successful. Any suggestions on how I could see the logs/execution of the plugin would be appreciated!
The text was updated successfully, but these errors were encountered: