wingkwong / react-quiz-component

:orange_book: React Quiz Component
https://wingkwong.github.io/react-quiz-component/
MIT License
379 stars 147 forks source link

_marked.default #79

Closed hypo-thesis closed 1 year ago

hypo-thesis commented 2 years ago

There is a huge type error here upon installing and using a simple <Quiz quiz={quiz} />

What to do? How to get it working?

wingkwong commented 2 years ago

I don't see that error. Mind to share more how you install or the version?

hypo-thesis commented 2 years ago

I don't see that error. Mind to share more how you install or the version?

https://codesandbox.io/s/green-dawn-tjgc09?file=/src/App.js:5290-5311

Version 0.4.0

realisticattorney commented 2 years ago

did you fix it?

wingkwong commented 2 years ago

@realisticattorney Not yet. Haven't got time to look into this issue yet. any PR to fix is welcome.

justoverclockl commented 2 years ago

same error

kanivets commented 2 years ago

Same here.

Works fine if pulling code from https://github.com/wingkwong/react-quiz-component/tree/develop/src/lib

Error happens once installing module via yarn.

mrruby commented 2 years ago

Any update about this, same issue with gatsby and yarn

Gr33nLight commented 2 years ago

I can check on this

Gr33nLight commented 2 years ago

Apparently it has to do with a compatibility issue with the version of the marked module, that doesn't seem to support cjs anymore, especially if used with webpack. Here they talk about version 4.0.0 onwards: https://github.com/markedjs/marked/issues/2265

Some ugly fixes are available but a clean solution is not available yet it seems..

wingkwong commented 2 years ago

Please try on 0.5.0

SaadBazaz commented 1 year ago

Same here.

Works fine if pulling code from https://github.com/wingkwong/react-quiz-component/tree/develop/src/lib

Error happens once installing module via yarn.

Still facing this issue. However, I did the above (Downloaded the code as zip, extracted it to my project's components folder, and imported directly)... and voila. It works. Good temporary solution.

wingkwong commented 1 year ago

fixed in 0.5.1