transitive-bullshit / nextjs-notion-starter-kit

Deploy your own Notion-powered website in minutes with Next.js and Vercel.
https://transitivebullsh.it/nextjs-notion-starter-kit
MIT License
6.16k stars 5.23k forks source link

Random errors : RequestError: connect ETIMEDOUT #380

Open AlainRo opened 1 year ago

AlainRo commented 1 year ago

Description

npm run dev is working fine but I am getting ETIMEDOUT at random when npm run build Same run build leads to different pages in error.

It look to me like access to NotionPages is fragile. Is there any parameters to tweak in order to secure a correct build ?

Notion Test Page ID

An example of Pages in error : rootNotionPageId : '8ab7aff4e6ea478186bd84fa8dd79e94',

transitive-bullshit commented 1 year ago

Unfortunately, this is heavily dependent on the Notion API and your web connection. You can try wrapping the notion page fetching in a try / catch and add a few retries on top of the retry logic that it already has.