click-prompt icon indicating copy to clipboard operation
click-prompt copied to clipboard

[new feature]: navbar not working with i18n headers

Open phodal opened this issue 2 years ago • 0 comments

@CGQAQ

PS: I add a try catch in getAppData()

bug:

  1. open http://localhost:3000/zh-CN/chatgpt-samples/ddd-sample/
  2. console will show:
DynamicServerError: Dynamic server usage: headers
    at Object.staticGenerationBailout (webpack-internal:///(sc_server)/./node_modules/next/dist/client/components/static-generation-bailout.js:18:21)
    at headers (webpack-internal:///(sc_server)/./node_modules/next/dist/client/components/headers.js:12:39)
    at getAppData (webpack-internal:///(sc_server)/./src/i18n/index.ts:68:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NavBar (webpack-internal:///(sc_server)/./src/layout/NavBar.tsx:28:34) {
  digest: 'DYNAMIC_SERVER_USAGE'
}

phodal avatar Mar 08 '23 15:03 phodal