This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-02
Channels
- # announcements (3)
- # aws (3)
- # bangalore-clj (1)
- # beginners (88)
- # boot (7)
- # braveandtrue (10)
- # cider (6)
- # cljdoc (8)
- # cljsrn (3)
- # clojure (33)
- # clojure-germany (2)
- # clojure-italy (1)
- # clojure-spec (44)
- # clojure-uk (8)
- # clojurescript (14)
- # datomic (5)
- # emacs (6)
- # events (1)
- # figwheel-main (8)
- # fulcro (9)
- # leiningen (11)
- # lumo (3)
- # off-topic (119)
- # parinfer (2)
- # pedestal (1)
- # re-frame (11)
- # reagent (12)
- # shadow-cljs (162)
- # unrepl (4)
I managed to compile with shadow-cljs watch app
and then run node target/app.js
. Next, on another window, I ran shadow-cljs cljs-repl app
, but I can't load the cljs namespace?
shadow-cljs - connected to server
[1:1]~cljs.user=> (+ 3 3)
[2:1]~cljs.user=> (require '[myapp.core :as mc])
[7:1]~cljs.user=> (myapp.core/main)
<eval>:1
myapp.core.main.call(null)
^
TypeError: Cannot read property 'call' of undefined
But didn't really do much work on lumo
anyway let me start on a minimal code and send you the output
shadow-cljs - connected to server
[1:1]~cljs.user=> (+ 3 3)
6
[1:1]~cljs.user=> (require '[myapp.core])
nil
[1:1]~cljs.user=> myapp.core/main)
nil
[1:1]~cljs.user=> (myapp.core/main)
<eval>:1
myapp.core.main.call(null)
^
TypeError: Cannot read property 'call' of undefined
Just a quick question, I am reading through the user guide. What's the difference between cljs-repl
and node-repl
?
thats a bug tracked here https://github.com/thheller/shadow-cljs/issues/373
Hmm. The output was appearing in the node-repl
window just now. Don't know what I did, but it's not appearing inside node-repl
window now. cljs-repl
works though
I think it could be a bug. Because when I quit node-repl
and restarted it, the output disappeared
there is not really anything to reproduce. its a known issue. just didn't get to it yet
cljs-repl is recommended if you have an actual running application that you just want to poke into
Need me to update https://github.com/thheller/shadow-cljs/issues/373 with this example, where the output ends up in the wrong place?
@thheller so I blew away the .m2
and .boot
directories and sure enough, I can no longer compile 😢
I did look into the properties of the app object, it seemed to be correct (confirmed with source) but did not exists when I tried to access them
so I cleared the folders and assumed it was caching something
now I am getting
ok, but where when compiling using shadow as a lib can I specify those things?
let me find the line I am invoking
I don't know anything about boot. I presume there is a command to show your dependencies
https://github.com/degree9/boot-shadow/blob/master/src/degree9/boot_shadow/impl.clj#L55-L59
The dependencies are handled by boot already
look at nothing else but the dependency graph that is used to invoke whatever command you are using
I see what you mean, it throws an error currently
boot show -p
in that repo is throwing an error
clojure.lang.Symbol cannot be cast to java.lang.Number
I’ll check the dependencies list for a typo
I believe so
here we go
@thheller line 109 [org.clojure/clojurescript “1.10.339”]
that comes from the boot pod
[[thheller/shadow-cljs "2.6.4"]]
is the version I am using
I dont know if there is an easy way to grab that
I dont think so
this is how I build the pod environment
kk one sec
I get an error when connecting to the repl
ClassNotFoundException shadow.cljs.devtools.cli java.net.URLClassLoader.findClass (URLClassLoader.java:381)
your boot setup is seriously frustrating. I'm afraid I can't help you. If you run into the same issue running the compile without boot I'm happy to look further but I can't look into how boot works.
and nothing happens after the resource func
that works just fine
I imagine the global npm version I have is different than the dependency boot is pulling in
I can update it
ah wait ... I guess thats boot nonsense again of not actually keeping the files in node_modules/...
but someplace else
right
boot dosent pollute the project dir
ok in your boot stuff make sure that the shadow.cljs.devtools.cli
namespace is required
I can print from the shadow-cljs repl I think
I’ll add the extra ns
ok, ns added starting server…..
ok I see
so this is really a classpath conflict
yeah I guess so hahaha 😛
I have seen that error plenty of times and it always was caused by an old clojurescript version
thats why the shadow-cljs command does a few extra tweaks to ensure that old versions don't get loaded
kk, thanks for your help on this, I need more coffee ☕
some progress….