{"record":{"id":"f590db986e2d4f39","repo":"vercel/next.js","slug":"export-const-dynamic-force-static-export-const","errorCode":null,"errorMessage":"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","messagePattern":"export const dynamic = \"force-static\"/export const revalidate not configured on route \"(.+?)\" with \"output: export\"\\. See more info here: https://nextjs\\.org/docs/advanced-features/static-html-export","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/route-modules/app-route/module.ts","lineNumber":329,"sourceCode":"  }\n\n  private _onUserlandLoaded(userland: AppRouteUserlandModule): void {\n    // Automatically implement some methods if they aren't implemented by the\n    // userland module.\n    this._methods = autoImplementMethods(userland)\n\n    // Get the non-static methods for this route.\n    this._hasNonStaticMethods = hasNonStaticMethods(userland)\n\n    // Get the dynamic property from the userland module.\n    this._dynamic = userland.dynamic\n    if (this.nextConfigOutput === 'export') {\n      if (this._dynamic === 'force-dynamic') {\n        throw new Error(\n          `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`\n        )\n      } else if (!isStaticGenEnabled(userland) && userland['GET']) {\n        throw new Error(\n          `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`\n        )\n      } else {\n        this._dynamic = 'error'\n      }\n    }\n\n    // We only warn in development after here, so return if we're not in\n    // development.\n    if (process.env.NODE_ENV === 'development') {\n      // Print error in development if the exported handlers are in lowercase, only\n      // uppercase handlers are supported.\n      const lowercased = HTTP_METHODS.map((method) => method.toLowerCase())\n      for (const method of lowercased) {\n        if (method in userland) {\n          Log.error(\n            `Detected lowercase method '${method}' in '${\n              this.resolvedPagePath","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/route-modules/app-route/module.ts#L311-L347","documentation":"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.","triggerScenarios":"A route under output: export lacks force-static or revalidate config.","commonSituations":"Route handlers in static export must be force-static or have revalidate configured.","solutions":["Set export const dynamic = \"force-static\" (and configure revalidate) on the route for output: export."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"258b1c1bc05f7099816b88f70b7b3422b24a4b8d","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}