NotionX/react-notion-x

Potential Notion API breakage

Opened this issue · 0 comments

Description

Thanks for this package, it has worked great so far. But since Yesterday (we didn't run the build a few days before that, so maybe earlier) we get this error

Error occurred prerendering page "/blog". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of undefined (reading 'a741637a-07bc-47d5-9114-ffffffffffa5')
    at B (file:///myCodeWebsite/node_modules/notion-utils/build/index.js:1:1602)
    at file:///myCodeWebsite/node_modules/notion-utils/build/index.js:1:7307
    at Array.flatMap (<anonymous>)
    at Ye (file:///myCodeWebsite/node_modules/notion-utils/build/index.js:1:6637)
    at getPreviewImageMap (myCodeWebsite\.next\server\chunks\9077.js:302:80)
    at Object.getCollectionData (myCodeWebsite\.next\server\chunks\9077.js:241:115)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getStaticProps (myCodeWebsite\.next\server\pages\blog.js:303:25)
    at async renderToHTML (myCodeWebsite\node_modules\next\dist\server\render.js:385:20)
    at async myCodeWebsite\node_modules\next\dist\export\worker.js:286:36
export const getStaticProps = async () => {
  const notionPosts = await notion.getCollectionData({
    collectionId: blogCollectionId,
    viewId: blogViewId,
  });

  return {
    props: {
      notionPosts,
    },
    revalidate: 10,
  };
};

Notion Test Page ID

todo