rsnext/errors/export-no-custom-routes.mdx
Delba de Oliveira 44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00

22 lines
988 B
Text

---
title: Export Custom Routes
---
## Why This Error Occurred
In your `next.config.js` you defined `rewrites`, `redirects`, or `headers` along with `output: 'export'` (or you ran `next export`).
These configs do not apply when exporting your Next.js application manually.
## Possible Ways to Fix It
- Remove `rewrites`, `redirects`, and `headers` from your `next.config.js` to disable these features or
- Remove `output: 'export'` (or `next export`) in favor of [`next start`](/docs/pages/api-reference/next-cli#production) to run a production server
## Useful Links
- [Deployment Documentation](/docs/pages/building-your-application/deploying)
- [`output: 'export'` Documentation](/docs/pages/building-your-application/deploying/static-exports)
- [Rewrites Documentation](/docs/pages/api-reference/next-config-js/rewrites)
- [Redirects Documentation](/docs/pages/api-reference/next-config-js/redirects)
- [Headers Documentation](/docs/pages/api-reference/next-config-js/headers)