#MDX Error: Expected ";" but found ":"
22 messages · Page 1 of 1 (latest)
It works and conforms to the schema with the .md extension
---
title: Title
byline: Author
date: 2023-02-21
updated: 2023-02-22
cover: /image.png
---
Is that the full file contents?
No, but the rest doesn't seem to matter
Here's a file that has the same error:
---
title: Hello, world
byline: Jerome
date: 2023-02-25
cover: assets/cover.png
---
This is the contents
It only shows this error once the schema is met, otherwise it shows a schema error
(So something must be able to parse the frontmatter)
Which version of the MDX integration do you have installed?
😅 haha, glad we’ve solved it
Wonder if we can give a hint in this case. Expected ";" but found ":" isn’t very helpful 🤔
We're supposed to have one actually
Huh. @north yoke any chance you're using Astro v1? Looks like we should be showing a more helpful message since v2 so would be good to know if that's not working.
Oh although I guess that's unlikely given I see the pretty error overlay
I think it doesn't trigger because the error message doesn't have "SyntaxError" in it
Ahh. Is there a way we check earlier? Feels like we could interrupt any .mdx loading without checking for a specific error message. (I did look yesterday briefly but don't know the codebase well enough to really know where to look.)
I think we avoided this route in case someone wanted to have their own MDX integration