-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
TypeError: (0 , unist_util_visit__WEBPACK_IMPORTED_MODULE_1__.visit) is not a function #840
Comments
Welcome @adam-magyar-instructure! 👋 This isn't a Some likely root causes:
A helpful guide on common issues using ESM with outdated package managers https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c |
This comment has been minimized.
This comment has been minimized.
Another potential cause:
|
Initial checklist
Affected packages and versions
9.0.1
Link to runnable example
No response
Steps to reproduce
`import React from 'react';
import { Heading, Img, Link, Text } from '@own-ui-lib';
import Markdown from 'react-markdown';
export function OwnUIMarkdown({ markdown }: { markdown: string }) {
return (
<Markdown
components={{
h1: ({ node, className, children, ...props }) => {children},
h2: ({ node, className, children, ...props }) => {children},
h3: ({ node, className, children, ...props }) => {children},
h4: ({ node, className, children, ...props }) => {children},
h5: ({ node, className, children, ...props }) => {children},
strong: ({ node, className, children, ...props }) => {children},
em: ({ node, className, children, ...props }) => {children},
a: ({ node, className, children, ...props }) => (
{children}
),
img: ({ node, className, children, ...props }) => <Img src={props.src ?? ''} alt={props.alt} />,
text: ({ node, className, children, ...props }) => {children},
p: ({ node, className, children, ...props }) => (
{children}
),
}}>
{markdown}
);
}
`
When using the component below I got the following error in the console and it breaks our application:
Expected behavior
It should not break the application and should render the markdown.
Actual behavior
It breaks the application.
Runtime
Node v17
Package manager
npm 8
OS
macOS
Build and bundle tools
Webpack
The text was updated successfully, but these errors were encountered: