Back to Withastro

Content entry is missing an ID

src/content/docs/en/reference/errors/content-loader-invalid-data-error.mdx

latest422 B
Original Source

import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />

Example error message:

The loader for blog returned invalid data.

Object is missing required property "id".

What went wrong?

The loader for a content collection returned invalid data. Inline loaders must return an array of objects with unique ID fields or a plain object with IDs as keys and entries as values.