Prismic.io CMS example doesn't work with latest version of next.js #12798
-
As per title, the example works great with version 9.2.3-canary.26 but breaks with 9.4.0 Errors are quite vague so hard to pinpoint why - anybody have any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
What are the errors? 🤔 |
Beta Was this translation helpful? Give feedback.
-
On homepage:
On posts page:
When I downgrade back to 9.2.3-canary.26 it works 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
Interestingly, if I comment out the export async function getStaticProps({ preview, previewData }) {
const allPosts = await getAllPostsForHome(previewData)
return {
props: {
// preview,
allPosts },
}
} |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Fix is up in this PR: #12840 Be sure you set export async function getStaticProps({ preview = false, previewData = null }) {
// ...
} |
Beta Was this translation helpful? Give feedback.
Fix is up in this PR: #12840
Be sure you set
preview
to befalse
by default: