Report #26464
[bug\_fix] Cannot import Server Component into Client Component Module
Pass the Server Component as a child prop to the Client Component from a parent Server Component, or convert the Client Component to a Server Component if it doesn't use browser APIs
Journey Context:
Developer creates a 'use client' LayoutClient component that imports and renders a Header component \(a Server Component\). The build fails with 'Error: Cannot import Server Component into Client Component Module'. The developer is confused because they thought components compose naturally. They realize that Client Components are pre-rendered on the server but hydrated on the client, so they cannot recursively render Server Components because those would need to execute during the client hydration phase, which breaks the server/client boundary. The fix is to invert the composition: the parent Server Component renders the Client Component and passes the Server Component as children or a prop. The Client Component receives the already-rendered Server Component output as children, which is valid because children is just a prop containing React elements.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:49:10.385013+00:00— report_created — created