Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot handle unknown node raw on Docusaurus v3 #4

Closed
Amgelo563 opened this issue Oct 31, 2023 · 10 comments
Closed

Cannot handle unknown node raw on Docusaurus v3 #4

Amgelo563 opened this issue Oct 31, 2023 · 10 comments

Comments

@Amgelo563
Copy link

When adding a diagram on Docusaurus 3.0.0, the following error is thrown when rendering the doc that contains said diagram:

Module build failed (from ../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@docusaurus/mdx-loader/lib/index.js):
Error: MDX compilation failed for file "D:\Projects\nyx\apps\docs\docs\features\commands\command-overview.mdx"
Cause: Cannot handle unknown node `raw`
Details:
Error: Cannot handle unknown node `raw`
    at unknown (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/hast-util-to-estree/lib/state.js:197:9)
    at one (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/zwitch/index.js:108:17)
    at Object.handle (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/hast-util-to-estree/lib/state.js:170:12)
    at Object.all (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/hast-util-to-estree/lib/state.js:225:25)
    at root (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/hast-util-to-estree/lib/handlers/root.js:26:26)
    at one (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/zwitch/index.js:108:17)
    at Object.handle (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/hast-util-to-estree/lib/state.js:170:12)
    at toEstree (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/hast-util-to-estree/lib/index.js:72:22)
    at file:///D:/Projects/nyx/node_modules/.pnpm/@[email protected]/node_modules/@mdx-js/mdx/lib/plugin/rehype-recma.js:28:12
    at wrapped (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:115:27)
    at next (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:65:23)
    at done (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:148:7)
    at then (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:158:5)
    at wrapped (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:136:9)
    at next (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:65:23)
    at done (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:148:7)
    at then (file:///D:/Projects/nyx/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:158:5)
    at Object.mdxLoader (D:\Projects\nyx\node_modules\.pnpm\@[email protected]_@[email protected][email protected][email protected][email protected]\node_modules\@docusaurus\mdx-loader\lib\loader.js:126:25)

The error seems to happen for every output type except img-base64, where it renders fine.

@Airkro

This comment was marked as outdated.

@Amgelo563

This comment was marked as outdated.

@Airkro Airkro pinned this issue Dec 1, 2023
@Airkro
Copy link
Member

Airkro commented Dec 1, 2023

I have published v0.3.1 to support [email protected]

Now this plugin can work with Docusaurus v3, please send me feedback.

Run docusaurus clear after installing the new version.

@Amgelo563

This comment was marked as outdated.

@Airkro

This comment was marked as duplicate.

@Amgelo563

This comment was marked as resolved.

@Airkro

This comment was marked as duplicate.

@Amgelo563

This comment was marked as duplicate.

@jaune162
Copy link

docusaurus 3.2.1
remark-kroki 0.3.6
output : inline-svg

Get this error again.

This error still exists after run command docusaurus clear

@Airkro
Copy link
Member

Airkro commented Apr 29, 2024

Have you read the https://github.com/show-docs/remark-kroki#troubleshooting document?

For now, mode mdx3 and inline-svg need the rehype-raw plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants