Error: export const dynamic = "force-dynamic" on page "/api/..." cannot be used with "output: export" #55937
Unanswered
mengxi-ream
asked this question in
App Router
Replies: 1 comment 2 replies
-
Hi,
To have API routes or any sort of server work you need a server running your next application. And for that you can't have export mode. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote some code in app router
app/api/generate
And in config:
I got the error when I run
next build
, which isError: export const dynamic = "force-dynamic" on page "/api/generate" cannot be used with "output: export"
Beta Was this translation helpful? Give feedback.
All reactions