Next.js Discord

Discord Forum

OOP In App router

Unanswered
British Shorthair posted this in #help-forum
Open in Discord
British ShorthairOP
For my setup I have created a class: ChatSDK. The class has a supabase instance, which is intilaized using the server. Then I have created server actions that invoke function related to the ChatSDK class.

When I invoke the server action inside a client component everything works. But when I do this in a server component I receive the following error:

Error: Invariant: cookies() expects to have requestAsyncStorage, none available

Does anyone know why this is happening?

0 Replies