Answer the question
In order to leave comments, you need to log in
'Circular structure' error when running on server?
NEXTJS - when starting a local server, everything works, but when running on a remote test server, I get an error
Circular structure in "getInitialProps" result of page "/home". https://err.sh/zeit/next.js/circular-structure
Home.getInitialProps = async ({ reduxStore, query }) => {
const type = query.type || reduxStore.getState().app.type;
await reduxStore.dispatch(initPage(query));
return {
namespacesRequired: ['common'],
type
};
};
Answer the question
In order to leave comments, you need to log in
See the contents of store. You either write cyclic data structures there, or write some third-party library object containing such data.
If you write your own helper in the store that uses third-party libraries, which is re-created on the client, then implement the toJSON method in it:
toJSON() {
return '[Helper Name]';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question