Error occurred prerendering when doing yarn build

we got error when doing a 'yarn next build'

Error occurred prerendering page "/insights/types/risk". Read more: https://err.sh/next.js/prerender-error
TypeError: Cannot destructure property 'pageInfo' of '((!fetching) && data && data.items)' as it is undefined.
at Search (/path/packages/redacted-website/.next/server/0.760bd3b2e9eb96482b67.js:1531:5)
at /path/node_modules/react-ssr-prepass/dist/react-ssr-prepass.production.min.js:1:3440
at rt (/path/node_modules/react-ssr-prepass/dist/react-ssr-prepass.production.min.js:1:3504)
at /path/node_modules/react-ssr-prepass/dist/react-ssr-prepass.production.min.js:1:7618
at /path/node_modules/react-ssr-prepass/dist/react-ssr-prepass.production.min.js:1:7639
at /Users/redacted/Git/Gitlabredacted/redacted/node_modules/react-ssr-prepass/dist/react-ssr-prepass.production.min.js:1:7093
at /Users/redacted/Git/Gitlabredacted/redacted/node_modules/react-ssr-prepass/dist/react-ssr-prepass.production.min.js:1:8003
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async prepass (/Users/redacted/Git/Gitlabredacted/redacted/packages/redacted-website/.next/server/pages/about.js:4091:3)
at async Object.modifyResult (/Users/redacted/Git/Gitlabredacted/redacted/packages/redacted-website/.next/server/pages/about.js:4188:23)

any help would be welcome.
Thanks

Hey @fredy, welcome to the Community

Where is (!fetching) && data && data.items coming from?
Maybe the props of a component aren't correctly passed. Could you show me a screenshot or code snippet of this part o your project.

This thread has been closed due to inactivity. Flag to reopen.