content-collections icon indicating copy to clipboard operation
content-collections copied to clipboard

[Feature Request] Error messages should be more clear

Open zhutmost opened this issue 1 year ago • 2 comments

First, thank the developers for your great jobs.

However, the error message from the current content-collections is very confusing. Different errors will throw similar messages, like this:

✘ [ERROR] Cannot process MDX file with esbuild [plugin @mdx-js/esbuild]

    _mdx_bundler_entry_point-6faee968-9fed-488f-bced-6ac4c9b0ccaa.mdx:0:0:
      0 │ ## Basic Usage
        ╵ ^

... error Error: Build failed with 1 error:
_mdx_bundler_entry_point-6faee968-9fed-488f-bced-6ac4c9b0ccaa.mdx:0:0: ERROR: [plugin: @mdx-js/esbuild] Cannot process MDX file with esbuild

The actual error can be a wrong image src, or a wrong rehype/remark plugin implementation, or other bugs. The current error message is helpless. At least, the error message should point out which plugin or which step generates it.

Again, thanks for your efforts. :D

zhutmost avatar Nov 12 '24 11:11 zhutmost

I think there is not much i can do to improve the error message. The error message comes from mdx-bundler, which i use to compile the mdx.

sdorra avatar Nov 12 '24 18:11 sdorra

Getting this error message when adding @remark-embedder/core plugin.

I am not sure how to debug this. 🤔

There is this long lasting issue: https://github.com/kentcdodds/mdx-bundler/issues/223

baptisteArno avatar Jan 07 '25 09:01 baptisteArno