Open swapanil opened 4 years ago
@swapanil Did you get this fixed , I have the same error
Fixed this by removing "prism" from the highlighter prop value
BEFORE
<SyntaxHighlighter
language='javascript'
style={docco}
highlighter={"prism" || "hljs"}
>
{codeString}
</SyntaxHighlighter>;
AFTER
<SyntaxHighlighter
language='javascript'
style={docco}
highlighter={"hljs"}
>
{codeString}
</SyntaxHighlighter>;
same. removing "prism" changed nothing
Solved. My problem was that we cannot use just style name. We need to import appropriate stylesheet file and use it for style prop
Example: import { docco } from 'react-syntax-highlighter/styles/hljs';