Previews and next.js

Hi I'm getting this error on my project when I preview locally. I used the next.js multi-lang template as as a starter and everything works fine apart from previews.

When I hit preview from prismic it loads the correct page then It then constantly refreshes that page and the error.

I'm not sure how I get to push the required dynamic files into the .next cached area.

Hi Rob,

I think that project is a bit outdated in terms of the preview functionality, it's in our backlog to update.

The best thing to do for now is to follow the latest Previews documentation:

We've implemented this in the blog project:

Let me know how that goes or if you have further questions.


Hey Phil thanks for the heads up yes the blog example makes more sense I have reworked the code and previews run ... what's interesting is that it borks on the exit preview then refreshes and I can see the changes pre publish but it refreshes two or three times before that happens and exit preview disapears. Although it works I'd like to tidy this up so it doesn't refresh three times.

Hey Rob,

Yeah unfortunately this strange 'bork' on exit previews where it talks about chunks has appeared in the last few releases of Next.js and we're not exactly sure why. I'm still investigating as to what is causing that strange behaviour, once I figure it out I'll get back to you.


Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.