Repository: withastro/astro
File: packages/astro/src/core/errors/errors-data.ts (TypeScript)

Code before:
		`\`astro sync\` command failed to generate content collection types: ${errorMessage}`,
	hint: (fileName?: string) =>
		`This error is often caused by a syntax error inside your content, or your content configuration file. Check your ${fileName ?? 'content config'} file for typos.`,
} satisfies ErrorData;
/**
 * @docs
 * @message No parser found for file `users.csv`. Pass a parser to the `file` loader (e.g. `parser: csv`).
 * @see
 *  - [parsers](https://docs.astro.build/en/guides/imports/#parsers)
 * @description
 * Thrown when the `file` loader can’t determine which parser to use.
 */
export const FileParserNotFound = {
	name: 'FileParserNotFound',
	title: 'File parser not found',
	message: (fileName: string) =>
		`No parser was found for '${fileName}'. Pass a parser function (e.g. \`parser: mdx\`) to the \`file\` loader.`,
} satisfies ErrorData;

/**
 * @docs
 * @message Glob patterns are not supported in the `file` loader. Use the `glob` loader instead.
 * @see
 *  - [glob patterns](https://docs.astro.build/en/guides/imports/#glob-patterns)
 * @description
 * Thrown when a glob pattern is supplied to the `file` loader.
 */
export const FileGlobNotSupported = {
	name: 'FileGlobNotSupported',
	title: 'Glob patterns are not supported in the file loader',
	message:
		'Glob patterns are not supported in the `file` loader. Use the `glob` loader instead.',
	hint:
		'See https://docs.astro.build/en/guides/imports/#glob-patterns for supported glob usage.',
} satisfies ErrorData;
/**
 * @docs
 * @kind heading
 * @name Content Collection Errors
 */
// Content Collection Errors
/**
 * @docs
 * @description
 * Astro encountered an unknown error loading your content collections.
 * This can be caused by certain errors inside your `src/content.config.ts` file or some internal errors.
 *
 * If you can reliably cause this error to happen, we'd appreciate if you could [open an issue](https://astro.build/issues/)
 */
export const UnknownContentCollectionError = {
	name: 'UnknownContentCollectionError',

Review comment (suggestion):
```suggestion
 * The `file` loader must be passed a single local file. Glob patterns are not supported. Use the built-in `glob` loader to create entries from patterns of multiple local files.
```

Code after:
export const UnknownCLIError = {
	name: 'UnknownCLIError',
	title: 'Unknown CLI Error.',
} satisfies ErrorData;
/**
 * @docs
 * @description
 * `astro sync` command failed to generate content collection types.
 * @see
 * - [Content collections documentation](https://docs.astro.build/en/guides/content-collections/)
 */
export const GenerateContentTypesError = {
	name: 'GenerateContentTypesError',
	title: 'Failed to generate content types.',
	message: (errorMessage: string) =>
		`\`astro sync\` command failed to generate content collection types: ${errorMessage}`,
	hint: (fileName?: string) =>
		`This error is often caused by a syntax error inside your content, or your content configuration file. Check your ${fileName ?? 'content config'} file for typos.`,
} satisfies ErrorData;

/**
 * @docs
 * @kind heading
 * @name Content Collection Errors
 */
// Content Collection Errors
/**
 * @docs
 * @description
 * Astro encountered an unknown error loading your content collections.
 * This can be caused by certain errors inside your `src/content.config.ts` file or some internal errors.
 *
 * If you can reliably cause this error to happen, we'd appreciate if you could [open an issue](https://astro.build/issues/)
 */
export const UnknownContentCollectionError = {
	name: 'UnknownContentCollectionError',
	title: 'Unknown Content Collection Error.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * Astro tried to render a content collection entry that was undefined. This can happen if you try to render an entry that does not exist.
 */
export const RenderUndefinedEntryError = {
	name: 'RenderUndefinedEntryError',
	title: 'Attempted to render an undefined content collection entry.',
	hint: 'Check if the entry is undefined before passing it to `render()`',
} satisfies ErrorData;

/**