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

Multiline code block crashing page #559

Open
ntcnjl opened this issue Aug 1, 2023 · 5 comments
Open

Multiline code block crashing page #559

ntcnjl opened this issue Aug 1, 2023 · 5 comments

Comments

@ntcnjl
Copy link

ntcnjl commented Aug 1, 2023

When using the ``` code block, the whole page crashes with multiple errors in the console:

react-dom.development.js:18687 The above error occurred in the <ReactMarkdown> component:

    at ReactMarkdown (https://website/static/js/bundle.js:233154:42)
    at div
    at https://website/static/js/bundle.js:38066:32
    at div
    at div
    at div
    at https://website/static/js/bundle.js:38452:70
    at div
    at AjaxElementLoader (https://website/static/js/bundle.js:933:143)
    at AjaxWidgetLoader (https://website/static/js/bundle.js:1041:143)
    at Note (https://website/static/js/bundle.js:14205:143)
    at ConnectFunction (https://website/static/js/bundle.js:159021:68)
    at div
    at div
    at Widget (https://website/static/js/bundle.js:9445:143)
    at div
    at Resizable (https://website/static/js/bundle.js:161498:35)
    at DraggableCore (https://website/static/js/bundle.js:150793:5)
    at GridItem (https://website/static/js/bundle.js:152323:5)
    at div
    at ReactGridLayout (https://website/static/js/bundle.js:153240:5)
    at ResponsiveReactGridLayout (https://website/static/js/bundle.js:154546:5)
    at WidthProvider (https://website/static/js/bundle.js:155303:7)
    at DashboardGrid (https://website/static/js/bundle.js:2490:143)
    at ConnectFunction (https://website/static/js/bundle.js:159021:68)
    at section
    at App (https://website/static/js/bundle.js:1317:143)
    at ConnectFunction (https://website/static/js/bundle.js:159021:68)
    at CatchError (https://website/static/js/bundle.js:2074:143)
    at Provider (https://website/static/js/bundle.js:158723:20)

React will try to recreate this component tree from scratch using the error boundary you provided, CatchError.

TypeError: N.entries is not a function
    at l (generator.js:304:1)
    at overload (index.js:173:1)
    at node (element<code>) (index.js:189:1)
    at node (element<pre>) (index.js:206:1)
    at node (root) (index.js:206:1)
    at visitParents (index.js:148:1)
    at visit (index.js:165:1)
    at generator.js:177:1
    at wrapped (index.js:115:1)
    at next (index.js:65:1) 

I am using the latest version with react 18.2.0, and have tried copying directly from the README and the error still occurs

@jaywcjlove
Copy link
Member

image

I can't reproduce your error.

@ntcnjl

@ntcnjl
Copy link
Author

ntcnjl commented Aug 2, 2023

Im using node 18.14.2, could that be causing issues?

@jaywcjlove
Copy link
Member

image

@ntcnjl I can't reproduce your error

@ntcnjl
Copy link
Author

ntcnjl commented Aug 4, 2023

I've been able to fix it by switching to a react-markdown for the preview which works fine

@jaywcjlove
Copy link
Member

@ntcnjl If you can provide a reproducible example, I can help you take a look

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

No branches or pull requests

2 participants