{"record":{"id":"c9f2e5350a1873c3","repo":"vercel/next.js","slug":"invalid-configfilename-options-detected","errorCode":null,"errorMessage":"Invalid ${configFileName} options detected: ","messagePattern":"Invalid (.+?) options detected: ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":2602,"sourceCode":"    // Group warnings first\n    if (warnings.length > 0) {\n      const warningMessages = [`Invalid ${configFileName} options detected: `]\n\n      for (const error of warnings) {\n        warningMessages.push(`    ${error.split('\\n').join('\\n    ')}`)\n      }\n\n      warningMessages.push(\n        'See more info here: https://nextjs.org/docs/messages/invalid-next-config'\n      )\n\n      // Call the callback with validation messages if provided\n      if (onValidationMessages) {\n        onValidationMessages(warningMessages)\n      }\n\n      for (const message of warningMessages) {\n        warn(message)\n      }\n    }\n\n    // Then throw hard errors\n    if (hasFatalErrors) {\n      await flushTelemetry()\n\n      const errorMessages = [\n        `Fatal next config errors found in ${configFileName} that must be fixed:`,\n      ]\n\n      for (const error of fatalErrors) {\n        errorMessages.push(`    ${error.split('\\n').join('\\n    ')}`)\n      }\n\n      errorMessages.push(\n        'These configuration options are required or have been migrated. Please update your configuration.'\n      )","sourceCodeStart":2584,"sourceCodeEnd":2620,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/config.ts#L2584-L2620","documentation":"Header line of the aggregated config-validation report printed at the end of config loading: individual checks in assignDefaultsAndValidate can push non-fatal problems into a warnings list instead of throwing. When that list is non-empty it is rendered under this heading (each message indented), optionally routed through the onValidationMessages callback, followed by a link to the invalid-next-config docs.","triggerScenarios":"Thrown at packages/next/src/server/config.ts:2557 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix or remove the invalid options in your next.config file as listed in the warning output."],"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-14T05:17:10.506Z"}