Skip to content

Commit

Permalink
[Fix] Incorrect error message for MDX peer dependency (#5617)
Browse files Browse the repository at this point in the history
* fix: out-of-date MDX error message

* chore: changeset
  • Loading branch information
bholmesdev committed Dec 17, 2022
1 parent fc46ca5 commit 33dcaa0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-nails-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix error message when using Content Collections and an out-of-date `@astrojs/mdx` integration
4 changes: 1 addition & 3 deletions packages/astro/src/content/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 33dcaa0

Please sign in to comment.