rsnext/errors/next-export-serverless.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

11 lines
421 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 'Using `next export` with `target` not set to `server`'
---
## Why This Error Occurred
Next.js can only handle exporting when the `target` is set to `server` (this is the default value). A serverless build, for instance, has no handler for requeststhis is usually implemented by a hosting provider.
## Possible Ways to Fix It
Change `target` to `server`, run `next build`, then run `next export` again.