So I’ve been working through this awesome fulcro book (Fulcro Developers Guide). I’ve managed to get it all working with shadow-cljs (including advanced compilation). But for fun I decided to see if I could get it to work with a bare bones cljs + webpack setup in order to get my head around advanced compilation/externs etc.
So I’ve managed to get it working with regular compilation. However with advanced compilation I get this error:
Uncaught TypeError: Cannot read property 'unstable_cancelCallback' of undefined at main.js:2 at Object.41 (main.js:2) at t (main.js:2) at main.js:2 at main.js:2
Seems to that
l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler is undefined.
Here’s the code:
(ns cljs-fulcro-demo.client (:require [com.fulcrologic.fulcro.application :as app] [com.fulcrologic.fulcro.components :as comp :refer [defsc]] [com.fulcrologic.fulcro.dom :as dom])) ;; (set! *warn-on-infer* true) (defonce app (app/fulcro-app)) (defsc Root [this props] (dom/div "Hello, world!")) (defn init  (app/mount! app Root "app")) (defn refresh  (app/mount! app Root "app") (comp/refresh-dynamic-queries! app)) (init) (comment (refresh))
[com.fulcrologic.fulcro.dom :as dom] is causing the issue.
Here’s a link to my repo (GitHub - andersmurphy/cljs-fulcro-demo)
Any help or pointers on what I’m doing wrong would be greatly appreciated.
PS: I feel like the moral of the story is just use shadow-cljs