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

Code before:
export const ExperimentalFontsNotEnabled = {
	name: 'ExperimentalFontsNotEnabled',
	title: 'Experimental fonts are not enabled',
	message:
		'The Font component is used but experimental fonts have not been registered in the config.',
	hint: 'Check that you have enabled experimental fonts and also configured your preferred fonts.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * Font family not found
 * @message
 * No data was found for the family passed to the Font component.
 */
export const FontFamilyNotFound = {
	name: 'FontFamilyNotFound',
	title: 'Font family not found',
	message: (family: string) =>
		`No data was found for the \`"${family}"\` family passed to the \`<Font>\` component.`,
	hint: 'This is often caused by a typo. Check that your Font component is using a `cssVariable` specified in your config.',
} satisfies ErrorData;

/**
 * @docs
 * @message No parser found for file `example.md`. Pass a parser to the `file` loader (e.g. `parser: mdx`).
 * @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.`,
	hint:
		'See https://docs.astro.build/en/guides/imports/#parsers for the list of available parser options.',
} 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',

Review comment (bug):
Can we instead use an example that might actually happen, because I believe you shouldn't *have* to ever pass an MDX parser to the built-in `file` loader? (If our MDX parser wasn't working, I think that would be a bug?) Similarly, should the file loader EVER be unable to parse a Markdown file automatically? (`example.md`)? Wouldn't that also be a bug?

The examples we give in docs are a CSV parser and a TOML parser, so these are more realistic examples:

https://docs.astro.build/en/guides/content-collections/#parser-function

Code after:
 * @message
 * Astro is unable to load the given font provider. Open an issue on the corresponding provider's repository.
 */
export const CannotLoadFontProvider = {
	name: 'CannotLoadFontProvider',
	title: 'Cannot load font provider',
	message: (entrypoint: string) => `An error occured while loading the "${entrypoint}" provider.`,
	hint: 'This is an issue with the font provider. Please open an issue on their repository.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * Font component is used but experimental fonts have not been registered in the config.
 */
export const ExperimentalFontsNotEnabled = {
	name: 'ExperimentalFontsNotEnabled',
	title: 'Experimental fonts are not enabled',
	message:
		'The Font component is used but experimental fonts have not been registered in the config.',
	hint: 'Check that you have enabled experimental fonts and also configured your preferred fonts.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * Font family not found
 * @message
 * No data was found for the family passed to the Font component.
 */
export const FontFamilyNotFound = {
	name: 'FontFamilyNotFound',
	title: 'Font family not found',
	message: (family: string) =>
		`No data was found for the \`"${family}"\` family passed to the \`<Font>\` component.`,
	hint: 'This is often caused by a typo. Check that your Font component is using a `cssVariable` specified in your config.',
} satisfies ErrorData;

/**
 * @docs
 * @kind heading
 * @name CSS Errors
 */
// CSS Errors
/**
 * @docs
 * @see
 * 	- [Styles and CSS](https://docs.astro.build/en/guides/styling/)
 * @description
 * Astro encountered an unknown error while parsing your CSS. Oftentimes, this is caused by a syntax error and the error message should contain more information.
 */