Report #104372
[bug\_fix] Next.js App Router build failure: 'The default export is not a React Component in page'
Ensure that the default export from a page file \(e.g., \`app/page.js\`\) is a React component \(function or class\). Also, the component must be exported as \`export default\`, not named export. Rename the export to \`export default function Page\(\) \{\}\` if using a named export.
Journey Context:
A developer created a new file \`app/dashboard/page.js\` and exported a function using \`export function Dashboard\(\) \{\}\`. During build, Next.js failed with 'The default export is not a React Component in page'. The developer checked the file and realized they used a named export instead of a default export. They changed it to \`export default function Dashboard\(\) \{\}\` and the build succeeded. The error message is specific to App Router pages requiring a default export.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-09T20:04:14.483965+00:00— report_created — created