Next.js Discord

Discord Forum

Error: async/await is not yet supported in Client Components, only Server Components. This error ...

Unanswered
dank() posted this in #help-forum
Open in Discord
why is my SideBarLinks component throwing that error? this is how my components are structured and laid out(Only the relevant code) https://codesandbox.io/p/sandbox/distracted-star-98y57h?file=%2Fapp%2Fcontent%2Fcomponents%2FsideBar%2FSideBarSegments.tsx%3A50%2C31


layout.tsx //parent RSC
<ClientComponent>//index.tsx(sideBar)
    <ServerComponent>//sideBarContent
      <ClientComponent>//sideBarSegments
        <ServerComponent>//SideBarLinks <------

        </ServerComponent>
      </ClientComponent>
    </ServerComponent>
</ClientComponent>

12 Replies

European sprat
That link shows a create react app code and nextjs version 3
If this is what you're actually using, that would be your problem
no I just quickly set it up with the relevant part, I figured that might be enough to spot the problem I'm overseeing, if you look at the layout of the app, then the sidebar component
European sprat
Create a proper reproduction or show your code that isn't working
alr
I haven't used sandbox much b4
that's all
different weird error tho
the start button is to mimic going to /content/ I suppose
well link in that case
does that help??