vercel/next.js · error · Error
export const dynamic = "force-dynamic" on page "${this.defin
Error message
export const dynamic = "force-dynamic" on page "${this.definition.pathname}" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export What it means
Error "export const dynamic = "force-dynamic" on page "${this.definition.pathname}" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export" thrown in vercel/next.js.
Source
Thrown at packages/next/src/server/route-modules/app-route/module.ts:325
// load time (as a Redbox in dev) rather than at request time.
if (nextConfigOutput === 'export') {
this._lazyUserland.loadIfNeeded()
}
}
private _onUserlandLoaded(userland: AppRouteUserlandModule): void {
// Automatically implement some methods if they aren't implemented by the
// userland module.
this._methods = autoImplementMethods(userland)
// Get the non-static methods for this route.
this._hasNonStaticMethods = hasNonStaticMethods(userland)
// Get the dynamic property from the userland module.
this._dynamic = userland.dynamic
if (this.nextConfigOutput === 'export') {
if (this._dynamic === 'force-dynamic') {
throw new Error(
`export const dynamic = "force-dynamic" on page "${this.definition.pathname}" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export`
)
} else if (!isStaticGenEnabled(userland) && userland['GET']) {
throw new Error(
`export const dynamic = "force-static"/export const revalidate not configured on route "${this.definition.pathname}" with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export`
)
} else {
this._dynamic = 'error'
}
}
// We only warn in development after here, so return if we're not in
// development.
if (process.env.NODE_ENV === 'development') {
// Print error in development if the exported handlers are in lowercase, only
// uppercase handlers are supported.
const lowercased = HTTP_METHODS.map((method) => method.toLowerCase())
for (const method of lowercased) {View on GitHub (pinned to 258b1c1bc0)
Solutions
- Remove export const dynamic = "force-dynamic" from the route, or drop output: export.
Defensive patterns
Strategy: validation
When it happens
Trigger: A route sets dynamic = "force-dynamic" with output: export.
Common situations: force-dynamic conflicts with static export; remove it or drop output: export.
AI-assisted analysis of vercel/next.js@258b1c1bc0 (2026-08-19).
Data as JSON: /api/errors/73edaefd17261367.
Report an issue: GitHub.