I'm currently using Next 9.2.3 with unstable_getStaticProps and Contentful without any issues. I attempted to upgrade to 9.3 now that SSG has been finalized and released.
Doing so, however, gives me a Reason: Circular references cannot be expressed in JSON. without any code changes. My data does have some circular references in it, but I go out of my way to remove them using fast-safe-stringify when the data is fetched via Contentful.
What changed between 9.2.3 and 9.3? Is it possible to tell Next to ignore the result of the circular reference test if I'm sure the data is serializable, as it was in 9.2.3?
Steps to reproduce the behavior, please provide code snippets or a repository:
unstable_getStaticProps with 9.2.3unstable_getStaticProps to getStaticPropsPage renders successfully in 9.3 as it does in 9.2.3

Looks like the issue is fixed in 9.3.1-canary.0 and the page renders successfully. Closing.
Note this means you're emitting duplicate data and may be able to trim some bundle size!
But yes, this was fixed in canary. 鉂わ笍
Hi. I just went through this on getStaticProps with latest next@canary (9.5.3-canary.25). I've solved it with decycle/retrocycle functions after reading about them on MDN.
import { decycle, retrocycle } from "cycle";
export default function Page({ entry }) {
const fineEntry = retrocycle(entry);
// ...
}
export async function getStaticProps() {
const entry = decycle(cycledEntry);
return {
props: {
entry,
},
};
}
Most helpful comment
Looks like the issue is fixed in
9.3.1-canary.0and the page renders successfully. Closing.