Markdown previewer: first problem encountered

Hi everyone.
I am trying to make my markdown previewer but even though I imported the “marked.js” library, when I try to use marked() I get:

‘marked’ is not defined no-undef

why is this?

EDIT: I had not installed react-marked. However now that I did. I get:

Module not found: Can’t resolve ‘marked’ in ‘C:\Users\Usuario\markdown-previewer\src\Output’

EDIT 2: package.json dependencies are what they’re supposed to be. I restarted VSCode and now I get a completely different error (!):

Error: marked(): input parameter is undefined or null

12 | dangerouslySetInnerHTML = {{__html: marked(props.output)}}>

I’m losing my mind here .I appreciate yourhelp!

Thank you!

Fixed! If anyone is curious I was just having problems receiving my input text in the Output component where I’m calling marked(), because I hadn’t included the ‘output’ property in the original state. Then I had some mixed up with event handlers because it’s my biggest issue with React. but I finally solved it :slight_smile: