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.27k stars 5.29k forks source link

Page Generation Fails on Certain Pages with 502 error #335

Open Lermatroid opened 2 years ago

Lermatroid commented 2 years ago

When generating the pages using npm run build pages time out after 2 attempts. This happens even after reattempting to build.

Page ID that errors: af74a514d795499193b3487b200ebb39

jingchengchen-com commented 2 years ago

I also have this bug but every time when I build, one or two random pages will have this error.

[ ===] info  - Generating static pages (193/195)page error troi HTTPError: Response code 502 (Bad Gateway)
    at Request.<anonymous> (C:\Users\jch\Desktop\nextjs-notion-starter-kit\node_modules\notion-client\node_modules\got\dist\source\as-promise\index.js:117:42)
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1658133587443,
    socket: 1658133587443,
    lookup: 1658133587444,
    connect: 1658133587448,
    secureConnect: 1658133587452,
    upload: 1658133587452,
    response: 1658133621006,
    end: 1658133621007,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 1,
      tcp: 4,
      tls: 4,
      request: 0,
      firstByte: 33554,
      download: 1,
      total: 33564
    }
  }
}
Error occurred prerendering page "/troi". Read more: https://nextjs.org/docs/messages/prerender-error
HTTPError: Response code 502 (Bad Gateway)
    at Request.<anonymous> (C:\Users\jch\Desktop\nextjs-notion-starter-kit\node_modules\notion-client\node_modules\got\dist\source\as-promise\index.js:117:42)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
jingchengchen-com commented 2 years ago

@transitive-bullshit Could you help figure out what could be the issue here? The fact that it's random pages getting this error is not really debuggable.. thanks!