This documentation is for a legacy version of Next.js Supabase. For the latest version, please visit the Next.js Supabase Turbo documentation

Dynamic server usage error

The error Dynamic server usage Page couldn't be rendered statically because it used `cookies` is a common issue in Next.js. Here is the fix.

If you encounter the following error when starting the Makerkit application:

[ERROR] Dynamic server usage Page couldn't be rendered statically because it used `cookies`.

You can fix it by adding the following line to the nearest layout of the page that is causing the error:

export const dynamic = 'force-dynamic';

If it keeps happening, try to see if it is happening in yet another layout and add the line there as well. Do it until the error goes away.


Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS