Next.js Discord

Discord Forum

DynamicServerError: Dynamic server usage: cookies

Unanswered
Gaëtan H posted this in #help-forum
Open in Discord
My code: https://github.com/Steellgold/linkfy/tree/nextjs

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
DynamicServerError: Dynamic server usage: cookies
    at staticGenerationBailout (/vercel/path0/.next/server/chunks/344.js:202:21)
    at Object.cookies (/vercel/path0/.next/server/chunks/344.js:94:62)
    at NextServerComponentAuthStorageAdapter.getCookie (/vercel/path0/.next/server/chunks/101.js:203:42)
    at NextServerComponentAuthStorageAdapter.getItem (/vercel/path0/.next/server/chunks/101.js:572:28)
    at getItemAsync (/vercel/path0/.next/server/chunks/101.js:3724:33)
    at SupabaseAuthClient.__loadSession (/vercel/path0/.next/server/chunks/101.js:2102:71)
    at async /vercel/path0/.next/server/chunks/101.js:2073:36
    at async Object.__stack_guard___useSession__ (/vercel/path0/.next/server/chunks/101.js:3944:32)
    at async stackGuard (/vercel/path0/.next/server/chunks/101.js:3951:12)
    at async /vercel/path0/.next/server/chunks/101.js:2071:24 {
  digest: 'DYNAMIC_SERVER_USAGE'
}


During previous builds, I already had this error and it still deployed, but now that there are fewer than usual, it doesn't want to deploy anymore and ends up with the error.

> Build error occurred
Error: Call retries were exceeded
.... (max length discord)
  type: 'WorkerError'
}
 ELIFECYCLE  Command failed with exit code 1.
Error: Command "prisma generate && pnpm build" exited with 1



Using React 18.2.0 / Next 13.4.8

2 Replies

Log deploy failed:
Log deploy success: