NextXP SerializableError

I have a part which renders a list of children-items of a given node!
So my structure looks like the following:

Placing the booklist once is fine. Placing the list a second time produces the following error:

error - SerializableError: Error serializing `.common` returned from `getStaticProps` in "/[[...contentPath]]".
Reason: `object` ("[object Error]") cannot be serialized as JSON. Please only return JSON serializable data types.
    at isSerializable (D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\lib\is-serializable-props.js:61:15)
    at D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\lib\is-serializable-props.js:43:66
    at Array.every (<anonymous>)
    at isSerializable (D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\lib\is-serializable-props.js:40:39)
    at Object.isSerializableProps (D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\lib\is-serializable-props.js:63:12)
    at Object.renderToHTML (D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\server\render.js:439:93)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async doRender (D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\server\base-server.js:701:34)
    at async cacheEntry.responseCache.get.isManualRevalidate.isManualRevalidate (D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\server\base-server.js:806:28)
    at async D:\Developement\enonic\nextjs-lyn\node_modules\next\dist\server\response-cache\index.js:80:36 {
  page: '/[[...contentPath]]'

Let me know, if you need additional information!

Hi @luctho !

That most likely indicates an error in graphql query !
Try looking for clue in your nextjs server log and get back to me if you don’t figure it out yourself.


Hi @pmi . That gives me an idea.

The query is absolutely correct - but I use a fragment in the query and that only works here when I have the part once on 1 page !

I guess that NextXP only makes 1 API-call for the 2 parts- correct ???