samuelkraft/notion-blog-nextjs

Working in local smoothly. Getting prerendering error while deploying to vercel.

Closed this issue · 1 comments

info - Compiled successfully
info - Collecting page data...
info - Generating static pages (0/7)
info - Generating static pages (1/7)

Error occurred prerendering page "/05a933dc-114c-4de2-9c30-ee1bd25aca10". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read property 'plain_text' of undefined
at Post (/vercel/path0/.next/server/chunks/851.js:286:65)
at d (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498)
at bb (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
at a.b.render (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
at a.b.read (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
at Object.exports.renderToString (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138)
at Object.renderPage (/vercel/path0/node_modules/next/dist/server/render.js:621:45)
at Object.defaultGetInitialProps (/vercel/path0/node_modules/next/dist/server/render.js:301:51)
at Function.getInitialProps (/vercel/path0/.next/server/pages/_document.js:496:20)
at Object.loadGetInitialProps (/vercel/path0/node_modules/next/dist/shared/lib/utils.js:69:29)

Hi, do you have your environment variables added to vercel?