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
Let me preface this by saying I have no idea if it can be done or how much work it would be, so please feel free to close it.
It's also not really a fumadocs issue but mdx related.
I was writing some markdown and used a < to indicate "less than". It got parsed as a JSX component I think and then threw an error. That's expected I guess, it was just really hard to track down because the reported error was not helpful and didn't point anywhere close to the line the error was on.
The markdown in question:
#### Cons
- Cache invalidation requires communication with all machines or really low TTLs (<10s)
- Inefficient cache refresh patterns
- High load on S3 due to concurrent SWR requests from multiple machines
The error
Failed to compile.
./content/rfcs/0008-dataplane.mdx?collection=rfcs&hash=7915a037b9dbdb5831cc433091db61f8849683859023b6fc77e2bac78d349c36
0008-dataplane.mdx:31:84: Unexpected character `1` (U+0031) before name, expected a character that can start a name, such as a letter, `$`, or `_`
Import trace for requested module:
./content/rfcs/0008-dataplane.mdx?collection=rfcs&hash=7915a037b9dbdb5831cc433091db61f8849683859023b6fc77e2bac78d349c36
./.source/index.js
./app/source.ts
./app/design/layout.tsx
> Build failed because of webpack errors
ELIFECYCLE Command failed with exit code 1.
Describe the solution you'd like
Is it possible to detect this kind of error and return a more useful message that points me to the problem?
I guess it has 2 issues right now:
The reported line is wrong (probably due to transpilation?)
The error message is not helpful if it's pointing to a different line
Describe alternatives you've considered
I removed sections until I narrowed it down, not really fun, don't recommend it.
Additional context
No response
The text was updated successfully, but these errors were encountered:
the line number is actually correct, but since the frontmatter is stripped before passing to MDX compiler, the offset of frontmatter isn't counted. Guess we can replace it to empty lines that can be calculated by the compiler
What problem will this feature address?
Let me preface this by saying I have no idea if it can be done or how much work it would be, so please feel free to close it.
It's also not really a fumadocs issue but mdx related.
I was writing some markdown and used a
<
to indicate "less than". It got parsed as a JSX component I think and then threw an error. That's expected I guess, it was just really hard to track down because the reported error was not helpful and didn't point anywhere close to the line the error was on.The markdown in question:
The error
Describe the solution you'd like
Is it possible to detect this kind of error and return a more useful message that points me to the problem?
I guess it has 2 issues right now:
Describe alternatives you've considered
I removed sections until I narrowed it down, not really fun, don't recommend it.
Additional context
No response
The text was updated successfully, but these errors were encountered: