Keelan Gibb
Dynamic Server Usage Error from RSC calls
export const dynamic = "force-static";
This makes the build run by forcing all dynamic functions like headers and cookies to return empty values. This is not ideal because every RSC trpc call will need this at the top but this lets these be static pages instead of dynamic ones at the cost of disabling headers and cookies.
calling cookies() inside the RSC (not the createContext func) or setting the variable to force-dynamic instead will also fix the build issues but it turns them into dynamic pages.
7 replies