Issues with using react-markdown

Hi, I'm trying to use react-markdown in my extension, but when I try to include it I get a strange error.

I've installed it using pnpm install react-markdown and then have imported it in my content.tsx file import Markdown from "react-markdown". I then just try to use it through <Markdown>{markdown}</Markdown>.

However, I'm getting the following error:

🔴 ERROR  | Cannot read properties of undefined (reading 'message')
🟡 195    | TypeError: Cannot read properties of undefined (reading 'message')   
    at new ThrowableDiagnostic (...\node_modules\.pnpm\@parcel+diagnostic@2.9.3\node_modules\@parcel\diagnostic\lib\diagnostic.js:128:26)
    at ResolverRunner.resolve (...\node_modules\.pnpm\@parcel+core@2.9.3\node_modules\@parcel\core\lib\requests\PathRequest.js:296:72)
    at async Object.run (...\node_modules\.pnpm\@parcel+core@2.9.3\node_modules\@parcel\core\lib\requests\PathRequest.js:92:16)
    at async RequestTracker.runRequest (...\node_modules\.pnpm\@parcel+core@2.9.3\node_modules\@parcel\core\lib\RequestTracker.js:633:20)
    at async AssetGraphBuilder.runPathRequest (...\node_modules\.pnpm\@parcel+core@2.9.3\node_modules\@parcel\core\lib\requests\AssetGraphRequest.js:294:18)
    at async $b0fd219fea43bcac$export$2e2bcd8739ae039._runFn (...\node_modules\.pnpm\@parcel+utils@2.9.3\node_modules\@parcel\utils\lib\index.js:34237:13)
    at async $b0fd219fea43bcac$export$2e2bcd8739ae039._next (...\node_modules\.pnpm\@parcel+utils@2.9.3\node_modules\@parcel\utils\lib\index.js:34230:9)

No idea why, anyone have any ideas?
Was this page helpful?