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
| Fact | Value |
|---|---|
| Issue type | invalid-client-export |
| Rule id in SARIF output | fallow/invalid-client-export |
| Command | fallow dead-code |
| Default severity | warn |
Config key in rules | invalid-client-export |
| Suppression comment | // fallow-ignore-next-line invalid-client-export |
Fixable with fallow fix | No |
| Opt-in | No |
| Frameworks | next |
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.