From 33dcaa05bb821ff0c6d0c6021b912855386be340 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Fri, 16 Dec 2022 19:14:59 -0500 Subject: [PATCH] [Fix] Incorrect error message for MDX peer dependency (#5617) * fix: out-of-date MDX error message * chore: changeset --- .changeset/red-nails-mix.md | 5 +++++ packages/astro/src/content/internal.ts | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/red-nails-mix.md diff --git a/.changeset/red-nails-mix.md b/.changeset/red-nails-mix.md new file mode 100644 index 0000000000..25893d94ff --- /dev/null +++ b/.changeset/red-nails-mix.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix error message when using Content Collections and an out-of-date `@astrojs/mdx` integration diff --git a/packages/astro/src/content/internal.ts b/packages/astro/src/content/internal.ts index 64c5bbd828..f49dd8d22c 100644 --- a/packages/astro/src/content/internal.ts +++ b/packages/astro/src/content/internal.ts @@ -138,9 +138,7 @@ async function render({ }); if (!mod._internal && id.endsWith('.mdx')) { - throw new Error( - `[Content] Failed to render MDX entry. Try installing @astrojs/mdx@next--content-schemas` - ); + throw new Error(`[Content] Failed to render MDX entry. Try installing @astrojs/mdx@latest`); } return { Content,