This looks like a different problem. Maybe it's related to your preview configuration. You need to check if the withPrismicPreviewResolver or withPrismicPreview functions are correctly set up. Similar errors occur when the Link Resolver isn't being passed.
Could you send us your preview.js file and the page template that is printing that error?
Your preview.js and prismicPreviews.js files look okay to me. They should not cause any errors.
At what point do you see the error appear? Based on your code and screenshot, I would guess it is happening on your page template.
Can you post the code for your page template where you see this error? This should be the file where you use `withPrismicPreview.
The error in your screenshot should only happen if you pass linkResolver something that isn't a function. This could happen by not importing the function correctly or passing it to withPrismicPreview incorrectly.
Regarding seeing the error on-screen vs. in the console: You'll only see the on-screen error during development (it will also be printed to the console in development). This is Gatsby's error modal that makes it more obvious when an error occurs. This is not included during production (i.e. on Netlify), so you'll only see the error in the console.
The error appears to be the same during development and production. The message is slightly different just due to code minification (linkResolver => e).
Pau
closed , flag & select 'Something Else' to reopen.
7
This thread has been closed due to inactivity. Flag to reopen.