day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
632 stars 68 forks source link

[Bug]: Viewing events tab causes panel to crash when using `figwheel.main`'s `:target :bundle` option. #346

Closed eval-on-point closed 1 year ago

eval-on-point commented 2 years ago

What happened?

A bug happened! See some discussion in the Clojurians Slack here. I've prepared a minimal example here.

10x Version

1.2.1

Reagent Version

1.1.0

React Version

17.0.2

re-frame Version

1.2.0

What browsers are you seeing the problem on?

Chrome

Relevant console output

core.cljs:13 Uncaught TypeError: Cannot read properties of undefined (reading 'call')
    at cmp.re_highlight$core$did_mount (core.cljs:13:6)
    at cmp.reagent$impl$component$custom_wrapper_$_componentDidMount [as componentDidMount] (component.cljs:240:25)
    at commitLifeCycles (react-dom.development.js:19814:22)
    at commitLayoutEffects (react-dom.development.js:22803:7)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188:14)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237:16)
    at invokeGuardedCallback (react-dom.development.js:292:31)
    at commitRootImpl (react-dom.development.js:22541:9)
    at unstable_runWithPriority (scheduler.development.js:653:12)
    at runWithPriority$1 (react-dom.development.js:11039:10)
p-himik commented 2 years ago

Pretty sure the root cause is that superstructor/re-highlight depends on highlight.js version 11.1.0 but re-frame-10x/project.clj specifies [cljsjs/highlight "10.3.1-0"].

kimo-k commented 1 year ago

We no longer depend on highlight.js, so hopefully this is fixed.