Next.js
Next.js Dynamic Server Usage loses request context
Request APIs such as cookies and headers rely on the active request context. Calling them in detached asynchronous work can produce an uncaught DynamicServerError during generation.
Next.js
Request APIs such as cookies and headers rely on the active request context. Calling them in detached asynchronous work can produce an uncaught DynamicServerError during generation.
Observed message
DynamicServerError
Why it happens
How to fix it
Official reference
Next.js official documentationRelated errors
Explore more