{"record":{"id":"5383fd011285fa1f","repo":"withastro/astro","slug":"no-entry-type-found-for-entry","errorCode":null,"errorMessage":"No entry type found for ${entry}","messagePattern":"No entry type found for (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/astro/src/content/loaders/glob.ts","lineNumber":132,"sourceCode":"\t\t\tparseData,\n\t\t\tstore,\n\t\t\tgenerateDigest,\n\t\t\tentryTypes,\n\t\t}) => {\n\t\t\tconst renderFunctionByContentType = new WeakMap<\n\t\t\t\tContentEntryType,\n\t\t\t\tContentEntryRenderFunction\n\t\t\t>();\n\n\t\t\tconst untouchedEntries = new Set(store.keys());\n\t\t\tasync function syncData(\n\t\t\t\tentry: string,\n\t\t\t\tbase: URL,\n\t\t\t\tentryType?: ContentEntryType,\n\t\t\t\toldId?: string,\n\t\t\t) {\n\t\t\t\tif (!entryType) {\n\t\t\t\t\tlogger.warn(`No entry type found for ${entry}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst fileUrl = new URL('./' + encodeURI(entry), base);\n\t\t\t\tconst contents = await fs.readFile(fileUrl, 'utf-8').catch((err) => {\n\t\t\t\t\tlogger.error(`Error reading ${entry}: ${err.message}`);\n\t\t\t\t\treturn;\n\t\t\t\t});\n\n\t\t\t\tif (!contents && contents !== '') {\n\t\t\t\t\tlogger.warn(`No contents found for ${entry}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { body, data } = await entryType.getEntryInfo({\n\t\t\t\t\tcontents,\n\t\t\t\t\tfileUrl,\n\t\t\t\t});\n","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/withastro/astro/blob/e294953aa8aadd98d5be92e60a03037b05dbdfd4/packages/astro/src/content/loaders/glob.ts#L114-L150","documentation":"A file matched the glob() loader's pattern, but its extension is not registered as a content or data entry type (built-ins like .md, .json, .yaml, plus types registered by integrations such as @astrojs/mdx for .mdx). syncData() bails out with this warning and the file is not ingested into the collection.","triggerScenarios":"A broad pattern like '**/*' matching .txt/.csv/.asset files; referencing .mdx files without the MDX integration installed or enabled; a custom entry type from an integration that is not loaded in this project.","commonSituations":"Widening patterns from '**/*.md' to '**/*' and catching stray files; adding notes/draft files with unusual extensions into a content directory; forgetting to run astro add mdx before using .mdx entries.","solutions":["Narrow the glob pattern to supported extensions, e.g. '**/*.md' or ['**/*.md', '**/*.mdx']","Install and enable the integration that registers the entry type (e.g. @astrojs/mdx for .mdx)","If you need a custom format, register a ContentEntryType/DataEntryType from an integration"],"exampleFix":"// before: src/content.config.ts\nconst blog = defineCollection({ loader: glob({ pattern: '**/*', base: './src/data/blog' }) });\n\n// after\nconst blog = defineCollection({ loader: glob({ pattern: ['**/*.md', '**/*.mdx'], base: './src/data/blog' }) });","handlingStrategy":"type-guard","validationCode":"// Derive glob patterns from the extensions you actually support instead of '**/*'\nconst SUPPORTED_EXTENSIONS = ['.md', '.mdx', '.json', '.yaml', '.yml'] as const;\nconst pattern = SUPPORTED_EXTENSIONS.map((ext) => `**/*${ext}`);","typeGuard":"type ContentFile = `${string}.${'md' | 'mdx' | 'json' | 'yaml' | 'yml'}`;\nconst REGISTERED_EXTENSIONS = new Set(['.md', '.mdx', '.json', '.yaml', '.yml']);\nfunction hasRegisteredEntryType(file: string): file is ContentFile {\n  const dot = file.lastIndexOf('.');\n  return dot !== -1 && REGISTERED_EXTENSIONS.has(file.slice(dot));\n}","tryCatchPattern":null,"preventionTips":["Never use a catch-all pattern like '**/*' for content; enumerate supported extensions","Install entry-type integrations (e.g. @astrojs/mdx) before referencing their extensions","When adding a new format, wire its integration first and add the extension to the pattern"],"tags":["astro","content-collections","glob-loader","file-extension","entry-type"],"backgroundTag":"unsupported-content-file-type","analyzedSha":"e294953aa8aadd98d5be92e60a03037b05dbdfd4","analyzedAt":"2026-08-21T18:22:53.330Z","contentChangedAt":"2026-08-21T18:22:53.330Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}