{"record":{"id":"060314ab61549a77","repo":"withastro/astro","slug":"auto-generating-collections-for-folders-in-src-co","errorCode":null,"errorMessage":"Auto-generating collections for folders in \"src/content/\" that are not defined as collections.\nThis is deprecated, so you should define these collections yourself in \"src/content.config.ts\".\nThe following collections have been auto-generated: ${orphanedCollections.map((name) => colors.green(name)).join(', ')}","messagePattern":"Auto-generating collections for folders in \"src/content/\" that are not defined as collections\\.\nThis is deprecated, so you should define these collections yourself in \"src/content\\.config\\.ts\"\\.\nThe following collections have been auto-generated: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/astro/src/content/utils.ts","lineNumber":619,"sourceCode":"\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (entry.isDirectory() && !(collectionName in collections)) {\n\t\t\t\torphanedCollections.push(collectionName);\n\t\t\t\tconst base = new URL(`${collectionName}/`, contentDir);\n\t\t\t\tcollections[collectionName] = {\n\t\t\t\t\ttype: CONTENT_LAYER_TYPE,\n\t\t\t\t\tloader: glob({\n\t\t\t\t\t\tbase,\n\t\t\t\t\t\tpattern: contentPattern,\n\t\t\t\t\t\t[secretLegacyFlag]: true,\n\t\t\t\t\t}) as any,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif (orphanedCollections.length > 0) {\n\t\t\tlogger.warn(\n\t\t\t\t'SKIP_FORMAT',\n\t\t\t\t`\nAuto-generating collections for folders in \"src/content/\" that are not defined as collections.\nThis is deprecated, so you should define these collections yourself in \"src/content.config.ts\".\nThe following collections have been auto-generated: ${orphanedCollections\n\t\t\t\t\t.map((name) => colors.green(name))\n\t\t\t\t\t.join(', ')}\\n`,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn { ...config, collections };\n}\n\nexport async function reloadContentConfigObserver({\n\tobserver = globalContentConfigObserver,\n\t...loadContentConfigOpts\n}: {","sourceCodeStart":601,"sourceCodeEnd":637,"githubUrl":"https://github.com/withastro/astro/blob/e294953aa8aadd98d5be92e60a03037b05dbdfd4/packages/astro/src/content/utils.ts#L601-L637","documentation":"Error \"Auto-generating collections for folders in \"src/content/\" that are not defined as collections.\nThis is deprecated, so you should define these collections yourself in \"src/content.config.ts\".\nThe following collections have been auto-generated: ${orphanedCollections.map((name) => colors.green(name)).join(', ')}\" thrown in withastro/astro.","triggerScenarios":"Thrown at packages/astro/src/content/utils.ts:619 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Define every folder under src/content/ explicitly as a collection in src/content.config.ts using the glob() file loader","Move non-collection content out of src/content/ (e.g. to src/data/) so it is not auto-adopted","After defining collections manually, remove any reliance on the deprecated auto-generation behavior"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e294953aa8aadd98d5be92e60a03037b05dbdfd4","analyzedAt":"2026-09-09T03:35:40.650Z","contentChangedAt":"2026-09-09T03:35:40.650Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}