Skip to content
Fallow home
All docs pages

Docs home

Invalid client exports

What an invalid-client-export finding of fallow dead-code means, why it matters and how to fix it.

What it reports

"use client" file exports a server-only / route-config name.

Architecture explains how fallow finds it.

Why it matters

Next.js rejects the file when it compiles the route, so the page fails to build. The check reports the export before anyone opens the page or runs the build.

Example

app/page.tsx starts with "use client" and exports metadata.

Fix

Move the server-only export to a module without "use client", such as a server component or layout.tsx. Or remove the directive when the module does not need to be a client boundary.

Facts

FactValue
Issue typeinvalid-client-export
Rule id in SARIF outputfallow/invalid-client-export
Commandfallow dead-code
Default severitywarn
Config key in rulesinvalid-client-export
Suppression comment// fallow-ignore-next-line invalid-client-export
Fixable with fallow fixNo
Opt-inNo
Frameworksnext

Note. Requires the project to declare next.

When to keep the code

  • When you handle the client and server boundary in another way, suppress the finding with // fallow-ignore-next-line invalid-client-export.