astro@6
5 traces
- Collections must have a loader defined — Astro 6 removed type: 'content' / type: 'data' collectionsAstro 6 fails with ContentCollectionMissingLoader: The collection is written in the Astro 2-4 style: defineCollection({ type: 'content', schema }). Fix: Astro 6 also uses Zod 4.
- Astro 6 removed Astro.glob() — use import.meta.glob(..., { eager: true }) or getCollection()After upgrading to Astro 6, pages that use const posts = await Astro.glob('./posts/.md') fail to build. Fix: For real content, prefer a content collection with getCollection().
- Astro 5/6 content layer: entry.slug is gone (use entry.id) and entry.render() → render(entry) from astro:contentWith Content Layer collections (default in Astro 5, the only option in Astro 6), post.slug is undefined, so getStaticPaths produces broken routes.
- Astro 5: output: 'hybrid' no longer exists — 'static' now allows per-page prerender = falseAn astro.config.mjs with output: 'hybrid' is rejected by config validation on Astro 5+. Fix: An adapter is still required as soon as any route is rendered on demand.
- Found legacy content config file in "src/content/config.ts" — Astro 6 requires src/content.config.ts with loadersAfter upgrading to Astro 6, astro dev / astro build fails with LegacyContentConfigError: The same project built without errors or warnings on Astro 5. Fix: Then give each collection a loader, remove type: and import z…