Gatsby preview path?

Hi there I’m wondering why when I build my Gatsby project I’m getting the error…

Building static HTML failed for path "/preview/page"

I’m not specifying a preview path in my config file, and from what I understand from the documentation previews are disabled by default. (I’m not sure if this is the same “preview” or not).

I’m lost on this issue and would appreciate some insight.

Here’s a link to my stackoverflow question on this for more detail and code snippets.

Thanks.

Hi @luke_h, I think the problem here is that you need to add a validation check on your content. The documentation page you were looking at needs to be updated. I’ll look into that.

By adding a validation check for content, the preview route can be generated without error. This page explains how to setup the validation check:
https://prismic.io/docs/gatsby/rendering/retrieve-the-document-object#21_0-adding-a-validation-check