vercel/next.js · error · Error
export const dynamic = "force-static"/export const revalidat
Error message
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 What it means
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" thrown in vercel/next.js.
Source
Thrown at packages/next/src/server/route-modules/app-route/module.ts:329
}
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) {
if (method in userland) {
Log.error(
`Detected lowercase method '${method}' in '${
this.resolvedPagePathView on GitHub (pinned to 258b1c1bc0)
Solutions
- Set export const dynamic = "force-static" (and configure revalidate) on the route for output: export.
Defensive patterns
Strategy: validation
When it happens
Trigger: A route under output: export lacks force-static or revalidate config.
Common situations: Route handlers in static export must be force-static or have revalidate configured.
AI-assisted analysis of vercel/next.js@258b1c1bc0 (2026-08-19).
Data as JSON: /api/errors/f590db986e2d4f39.
Report an issue: GitHub.