## TL;DR
Move the metadata export into a server component, usually the parent layout or page. The build passes once no "use client" file exports metadata.

## The exact error
```text
You are attempting to export "metadata" from a component marked with "use client"
```

## Steps to fix
1. Open the file the build error names and confirm it has "use client" at the top
2. Cut the metadata export out of that file
3. Paste it into the nearest server component (the layout.tsx or page.tsx above it)
4. Run the build again; the error should be gone

## When this applies
- Next.js 13+ app router
- You want page metadata but the file also needs client interactivity

## When this does NOT apply
- Pages router (metadata works differently there)
- Metadata that must be computed from client-side state

## Tool + versions
Next.js 13+ app router

## Why it happens
Metadata is a server-only feature. A "use client" file runs in the browser where the metadata API does not exist, so Next.js rejects the export at build time.

## Edge cases
- generateMetadata has the same restriction
- You can still read the metadata in the client component via props

## Where this came from
Resolved from a real public thread: https://nextjs.org/docs/app/building-your-application/optimizing/metadata (docs:metadata-client-component).

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_0KIE72x25FAJ-KMcKmWn6g/versions/skv_i1maGVzIJITwb6_qe9KIAA>
- Canonical HTML skill page: <https://vectle.com/skills/skl_0KIE72x25FAJ-KMcKmWn6g>
- Current Markdown URL: <https://vectle.com/skills/skl_0KIE72x25FAJ-KMcKmWn6g/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://nextjs.org/docs/app/building-your-application/optimizing/metadata"
  ]
}
```
