Help configuring codepen

Tell us what’s happening:
Describe your issue in detail here.

I was solving the markdown previewer challenge locally using create-react-app but when I try to pass all my code to codepen I keep getting this error telling me marked is not a function… I already add cdn through js editor config and html script tags but I cannot get it working :frowning:

here’s my codepen:

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Challenge: Build a Markdown Previewer

Link to the challenge:

If you are creating this challenge with create-react-app on your own computer then I don’t think you should try to put it in codepen. Rather, put it in github. As for a link to the finished product, you can use github pages or a variety of other free sites that let you host static web apps. I have used surge.sh several times and it works great.

1 Like

ok I’ll give it a go.
Thanks :slight_smile:

As for your original issue, you don’t want to use an import statement to import the marked library, so get rid of that. If you click on the settings (gear) icon in the JS panel you’ll see that the marked library is in there but it is using v4.0.2. I know there is a bug in the tests with that version, so change the version number to 2.0.3 and then I think you’ll be happy.

But my previous suggestion still stands. If you are building projects on your local computer it is much better to put them in github.

1 Like

hehe this is the second time you help me out today.
Thanks a lot!

I changed the version number like you said and it worked!
Also this is the first time I hear about surge.sh and it looks great, I’ll also be testing that out

:slight_smile: :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.