I've followed the official documentations:
- https://prismic.io/docs/previews-gatsby
- https://prismic.io/docs/technical-reference/gatsby-plugin-prismic-previews
- https://community.prismic.io/t/troubleshooting-previews/5449
- I've even tried all the solutions mentioned in prev Github issue v4: https://github.com/prismicio/prismic-gatsby/issues/384.
But no luck, always gives error A configuration object could not be found. Check that the repository is configured in your app's withPrismicPreview and withPrismicUnpublishedPreview.
Code snippet from: https://prismic.io/docs/previews-gatsby.
I've asked the same on Github: https://github.com/prismicio/prismic-gatsby/issues/534.