I'm working with the library react-markdown for the ease this gives at dealing with markdown files and content. But now I'm experiencing an unexpected error and tbh I do not really know how to solve it.
I'll insert the code below to see if I can get any help
LessonMd.tsx
import React from "react";
import ReactMarkdown from "react-markdown";
const LessonMd: React.FC = () => {
return (<div><ReactMarkdown>{`#Test one ##not working`}</ReactMarkdown></div>);
};
export default LessonMd;
App.tsx
function App(): JSX.Element {
return (
<div className="App">
<LessonMd/>
<TextEditor/>
</div>
)
}
export default App
ERROR MESSAGE
browser-external:process:9 Uncaught Error: Module "process" has been externalized for browser compatibility. Cannot access "process.cwd" in client code.
at Object.get (browser-external:process:9:13)
at new VFile (index.js:119:21)
at ReactMarkdown (react-markdown.js:97:16)
at renderWithHooks (react-dom.development.js:16305:18)
at mountIndeterminateComponent (react-dom.development.js:20074:13)
at beginWork (react-dom.development.js:21587:16)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)
at beginWork$1 (react-dom.development.js:27451:7)