Hi, @luchiniatwork — thank you for writing Hodur, as it's what made me brave enough to even try Datomic Cloud! (I loved gushing about it at Clojure/conj last year! https://www.youtube.com/watch?v=5mbp3SEha38&t=19s :).
it's been about a year I've used Hodur Visualizer, and I'm eager to jump into a new project. But when I tried to run the visualizer for an older project I did in January, the browser comes up blank, unable to find the dev-main.js
.
I'm now getting some warnings during the execution, and I'm wondering if it has to do with this issue: #6, about how figwheel can't find the bootstrap cljs file if it's put in a "dev like path."
I even made a symbolic link from "main.js" to "dev-main.js" inside of the "target/public" directory, but now I'm getting this error:
core.cljc:208 Uncaught ReferenceError: initialized is not defined
at hodur_visualizer_schema$core$apply_diagram_BANG_ (core.cljc:208)
at viz.cljc:12
hodur_visualizer_schema$core$apply_diagram_BANG_ @ core.cljc:208
(anonymous) @ viz.cljc:12
console.js:203 [goog.net.WebSocket] Opening the WebSocket on ws://localhost:9500/figwheel-connect?fwprocess=c0cd53&fwbuild=dev&fwsid=61ac7501-fa5f-4d32-91cd-4d6f95fd8959&fwsname=Elmo
console.js:203 [goog.net.WebSocket] WebSocket opened on ws://localhost:9500/figwheel-connect?fwprocess=c0cd53&fwbuild=dev&fwsid=61ac7501-fa5f-4d32-91cd-4d6f95fd8959&fwsname=Elmo
console.js:203 [Figwheel REPL] Session ID: 61ac7501-fa5f-4d32-91cd-4d6f95fd8959
Do you have any tips on getting the classpaths/paths set up correctly? Here's my current alias map in deps.edn
.
{:dev {:viz {:extra-paths ["config/dev" "target"]
:resource-paths ["target/public" "resources"]
:extra-deps {
;com.bhauman/figwheel-main {:mvn/version "0.2.12"}
gnl/ghostwheel {:mvn/version "0.3.9"}
hodur/engine {:mvn/version "0.1.6"}
hodur/visualizer-schema {:mvn/version "0.1.1"}
hodur/datomic-schema {:mvn/version "0.1.0"}}}
And here's the output:
make vizbooks
clojure -A:dev -m hodur-visualizer-schema.main books/viz
WARNING: When invoking clojure.main, use -M
[Figwheel:WARNING] Attempting to dynamically add "target" to classpath!
[Figwheel:WARNING] Target directory "target" is not on the classpath
[Figwheel:WARNING] Please fix this by adding "target" to your classpath
I.E.
For Clojure CLI Tools in your deps.edn file:
ensure "target" is in your :paths key
For Leiningen in your project.clj:
add it to the :resource-paths key
[Figwheel] Compiling build dev to "target/public/cljs-out/main.js"
[Figwheel] Successfully compiled build dev to "target/public/cljs-out/main.js" in 0.895 seconds.
[Figwheel] Watching paths: ("src") to compile build - dev
[Figwheel] Starting Server at http://localhost:9500
[Figwheel] Starting REPL
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Here's the initial error I got from the browser at it searched for the "wrong" bootstrap CLJS file: