This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-13
Channels
- # announcements (12)
- # babashka (88)
- # beginners (60)
- # biff (10)
- # calva (56)
- # clerk (9)
- # clj-kondo (5)
- # clojure (70)
- # clojure-austin (3)
- # clojure-conj (2)
- # clojure-dev (69)
- # clojure-europe (53)
- # clojure-nl (1)
- # clojure-norway (28)
- # clojure-uk (1)
- # clojurescript (27)
- # copenhagen-clojurians (3)
- # cursive (10)
- # datascript (1)
- # datomic (10)
- # fulcro (3)
- # funcool (1)
- # garden (7)
- # helix (5)
- # holy-lambda (5)
- # hyperfiddle (39)
- # introduce-yourself (6)
- # jobs-discuss (15)
- # lsp (3)
- # malli (5)
- # membrane (19)
- # missionary (1)
- # nrepl (6)
- # off-topic (44)
- # pathom (17)
- # pomegranate (3)
- # react (7)
- # releases (1)
- # shadow-cljs (39)
- # tools-deps (16)
- # xtdb (28)
My error with tap-inspector, html and table…
I’m using Tap Inspector
and these 2 forms work nicely:
;; just some HTML => ok
(tap> (clerk/html [:<> [:p "line 1"] [:p "line 2"]]))
;; just a table => ok
(tap> (clerk/table [{:a 1 :b 2} {:a 3 :b 4}]))
But when I try to send HTML with a table inside it (basically substituting line 2
for the table
):
;; HTML with a table inside => null is not an object (evaluating 'b [a] =c')
(tap> (clerk/html [:<> [:p "line 1"] (clerk/table [{:a 1 :b 2} {:a 3 :b 4}])]))
…it fails.
The error trace in the browser is: <has been moved into thread>
I’m using:
io.github.nextjournal/clerk {:mvn/version "0.12.707"}
What am I doing wrong? Or might it be a bug? Thanks.✅ 2
The error trace in the browser is:
TypeError: null is not an object (evaluating 'b[a]=c')
SE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68573
vfa — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68686
cF — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68864
Lfa — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68970
xE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68288
(anonymous function) — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68838
(anonymous function) — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:86331
Bc — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:56352
Efa — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68837
yE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68302
Lfa — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68960
xE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68288
Efa — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68835
yE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68302
Lfa — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68960
xE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68288
VE — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:68622
Et — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:63333
Zt — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:63523
L — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:39625
gl — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:44111
zg — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42475
mg — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42459
zb — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42154
vb — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42082
vb
k — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:36334
J — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:36365
q — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:40060
(anonymous function) — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:40091
vd — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:39168
t — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:41826
f — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:41799:90
e — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:41769
sf — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42567
Ie — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42523
vb — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:42099
vb
k — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:36334
J — 3J292uwuzpNFvuMeyWd1h7PtuAjBbUboke9HBHMhpRTTXYqgfxiaUGnx7396uTm879KgrLoMCFMF7qmdcHGAmw4f-viewer.js:36365
The (clerk/html …)
itself outputs what look like ok data:
#:nextjournal{:value
[:<>
[:p "line 1"]
#:nextjournal{:value [{:a 1, :b 2} {:a 3, :b 4}],
:viewer {:name :table, :transform-fn #function[nextjournal.clerk.viewer/fn--18719]}}],
:viewer {:name :html, :render-fn identity, :transform-fn #function[clojure.core/comp/fn--5876]}}
Using the latest commit…
io.github.nextjournal/clerk {:git/url "" :sha "6ee093d3b22eb278d412f2fe5946d2b34cf937b5"}
then…
(require '[nextjournal.clerk :as clerk])
(clerk/show! 'nextjournal.clerk.tap)
(clerk/serve! {:browse true})
displays in the browser…
error in render-fn: Could not resolve symbol: v/clerk-eval
{:render-fn (fn [!view] (let [choices [:stream :latest]] [:div.flex.justify-between.items-center (into [:div.flex.items-center.font-sans.text-xs.mb-3 [:span.text-slate-500.mr-2
"
View-as:"]]
(map (fn [choice] [:button.px-3.py-1.font-medium.hover:bg-indigo-50.rounded-full.hover:text-indigo-600.transition {:class (if (= (clojure.core/deref !view) choice)
"
bg-indigo-100 text-indigo-600"
"
text-slate-500")
:on-click (fn* [] (reset! !view choice))} choice]) choices)) [:button.text-xs.rounded-full.px-3.py-1.border-2.font-sans.hover:bg-slate-100.cursor-pointer {:on-click (fn* [] (v/clerk-eval (clojure.core/sequence (clojure.core/seq (clojure.core/concat (clojure.core/list (quote nextjournal.clerk.tap/reset-taps!)))))))}
"
Clear"]]))}
Show Stacktrace (14 lines)
error in render-fn: Could not resolve symbol: v/inspect-children
{:render-fn (fn* [%1 %2] (into [:div.flex.flex-col.pt-2] (v/inspect-children %2) %1))}
Show Stacktrace (14 lines)
And expanding the first of those 14 line Stacktraces shows….
error in render-fn: Could not resolve symbol: v/clerk-eval
{:render-fn (fn [!view] (let [choices [:stream :latest]] [:div.flex.justify-between.items-center (into [:div.flex.items-center.font-sans.text-xs.mb-3 [:span.text-slate-500.mr-2
"
View-as:"]]
(map (fn [choice] [:button.px-3.py-1.font-medium.hover:bg-indigo-50.rounded-full.hover:text-indigo-600.transition {:class (if (= (clojure.core/deref !view) choice)
"
bg-indigo-100 text-indigo-600"
"
text-slate-500")
:on-click (fn* [] (reset! !view choice))} choice]) choices)) [:button.text-xs.rounded-full.px-3.py-1.border-2.font-sans.hover:bg-slate-100.cursor-pointer {:on-click (fn* [] (v/clerk-eval (clojure.core/sequence (clojure.core/seq (clojure.core/concat (clojure.core/list (quote nextjournal.clerk.tap/reset-taps!)))))))}
"
Clear"]]))}
Hide Stacktrace (14 lines)
@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:3565:77
@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:2964:259
lga@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:2543:377
Vz@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:2544:296
Zv@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:2477:320
uw@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:2482:140
L@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1750:298
hl@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1892:104
Rd@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1837:503
Gd@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1837:355
K@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1827:314
K@[native code]
l@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1644:148
V@https://storage.googleapis.com/nextjournal-cas-eu/assets/2RxtwxycmEAGKwiqVky9Mu67yuFFfBZPHi3W8egjJMc7qBeMgshF2DeXDb2UMXNFVKSH7MZdkekUXmvApSCDfkbm-viewer.js:1645:13
So that really isn’t better than version 0.12.707 🙂
Let me know if you’d like me to try anything else. Cheers.@UFJ5R302F whoops, sorry about that, fixed in https://github.com/nextjournal/clerk/commit/72d3a0cdd1627873e4ecd09d60be63f3ec0ff6ef
@U5H74UNSF Martin - thank you for fixing that problem. Sending HTML-wrapped tables to the Tap Inspector works nicely with commit 72d3a0c 👍😃
@UFJ5R302F thanks for letting me know about the issue