You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm playing with this tool, and that is great!
Improving the error message output during the build phase would be nice.
For example, if the mdx file contains some invalid character, I see a clear error message:
error Unexpected character `/` (U+002F) before local name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a link in MDX, use `[text](url)`)
File:
/Users/roberto/visible-binary/src/content/docs/book/000_intro.mdx
or for example
[@mdx-js/rollup] Unexpected character `,` (U+002C) before name, expected a character that can start a name, such as a letter, `$`, or `_`
file: /Users/roberto/visible-binary/src/content/docs/book/009_sys_version_compare.mdx
The message is clear and shows the name of the file.
It would be nice (if possible) to have the number of the line of the file that raised the exception.
Why is this feature necessary?
To identify in a quick way the error to fix
Do you have examples of this feature in other projects?
No response
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
Thanks for the issue @roberto-butti! I believe those two errors are thrown by the MDX compiler itself, but would be good to investigate if they provide line numbers that Astro doesn't surface for some reason or if this would be something MDX needs to add to their error reporting.
Just played around with https://mdxjs.com/playground/ and badly formatted code does seem to report line and column data alongside the error. Will ask the Astro team if there’s a way to show that same data in Astro’s errors for MDX content.
What version of
starlight
are you using?0.8.0
What is your idea?
I'm playing with this tool, and that is great!
Improving the error message output during the build phase would be nice.
For example, if the mdx file contains some invalid character, I see a clear error message:
or for example
The message is clear and shows the name of the file.
It would be nice (if possible) to have the number of the line of the file that raised the exception.
Why is this feature necessary?
To identify in a quick way the error to fix
Do you have examples of this feature in other projects?
No response
Participation
The text was updated successfully, but these errors were encountered: