Error with Dynamic content when building project
Unanswered
tsdna posted this in #help-forum
tsdnaOP
Hello there! I am encountering the following error in my project when running
My repository is private, so please DM me your email if you're willing to help so I can share my repo with you.
pnpm build. Please help me understand how to fix this.My repository is private, so please DM me your email if you're willing to help so I can share my repo with you.
DynamicServerError: Dynamic server usage: headers
at staticGenerationBailout (/vercel/path0/.next/server/chunks/37.js:202:21)
at headers (/vercel/path0/.next/server/chunks/37.js:84:62)
at getServerSession (/vercel/path0/.next/server/chunks/10.js:9720:41)
at getAuthSession (/vercel/path0/.next/server/chunks/98.js:38:87)
at RootLayout (/vercel/path0/.next/server/chunks/119.js:565:51)
at preloadComponent (/vercel/path0/node_modules/.pnpm/next@13.4.9_@babel+core@7.22.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/preload-component.js:23:22)
at /vercel/path0/node_modules/.pnpm/next@13.4.9_@babel+core@7.22.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:606:101
at async createComponentTree (/vercel/path0/node_modules/.pnpm/next@13.4.9_@babel+core@7.22.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:606:29)
at async /vercel/path0/node_modules/.pnpm/next@13.4.9_@babel+core@7.22.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:810:60 {
digest: 'DYNAMIC_SERVER_USAGE'