uiwjs / react-md-editor

A simple markdown editor with preview, implemented with React.js and TypeScript.
https://uiwjs.github.io/react-md-editor
MIT License
2.03k stars 149 forks source link

Module '"@uiw/react-markdown-preview/nohighlight"' has no exported member 'MarkdownPreviewProps' #605

Closed faustman closed 6 months ago

faustman commented 6 months ago

Hi, I'm trying to integrate editor into Laravel inertia.js project, but got this error:

npm run build

> build
> tsc && vite build && vite build --ssr

node_modules/@uiw/react-md-editor/esm/Types.d.ts:2:15 - error TS2614: Module '"@uiw/react-markdown-preview/nohighlight"' has no exported member 'MarkdownPreviewProps'. Did you mean to use 'import MarkdownPreviewProps from "@uiw/react-markdown-preview/nohighlight"' instead?

2 import type { MarkdownPreviewProps } from '@uiw/react-markdown-preview/nohighlight';
                ~~~~~~~~~~~~~~~~~~~~

Found 1 error in node_modules/@uiw/react-md-editor/esm/Types.d.ts:2

not sure what to do. If someone could help me with this, it would be great. Thanks!

jaywcjlove commented 6 months ago

@faustman Fixed the type export problem, you may need to delete package-lock.json and node_modules and reinstall the dependencies.

faustman commented 6 months ago

Thank you! Works as expected now)