Fork me on GitHub
#luminus
<
2017-07-08
>
yogthos13:07:58

unfortunately block.super is specific for block tags as I recall

assoc-in17:07:29

I created a new luminus project with +re-frame and when I compile the core.cljs file from cider (C-c C-k) I get an error saying that Namespace myapp.handlers does not exist in the cljs repl. What is odd is that the website works and the figwheel log says it compiled successfully. Has anyone run into this before?

yogthos18:07:18

are you connecting to the nrepl that figwheel starts?

assoc-in18:07:38

@yogthos I believe so since I can switch to myapp.core ns and run (home-page) in the cljs repl. Is there a way to check that I am connected?

assoc-in18:07:14

I also tried this

(require '[cljs.repl :as repl] '[cljs.repl.node :as node])

(compile 'cljs.repl.node)

(cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env))
From the clojure repl and I got a similar error when I loaded the myapp.core.cljs file. The error was "No such namespace: myapp.ajax, clould not locat myapp/ajax.cljs, myapp/ajax.cljc, or closure namespace "myapp.ajax" in file myapp/src/cljs/myapp/core.cljs"

yogthos18:07:16

yeah that's kind of odd

yogthos18:07:01

just to make sure you're connecting cider to localhost:7002?

yogthos18:07:39

the user namespace should already have a function called cljs that you can run to connect to cljs repl as well

yogthos18:07:59

that comes from env/dev/clj/user.clj

assoc-in19:07:57

Yes I am connecting to that port

assoc-in19:07:51

I have had this problem for probably over a year now. I always just guessed that it was a limitation with cider's support for cljs.

yogthos19:07:00

hmm yeah that's odd, you're doing it after figwheel connects to the browser repl?

yogthos19:07:34

if I run both lein run and lein figwheel, and then open localhost:3000 in the browser, I'm able to run lein repl :connect localhost:7002 after, and once it connects I run (cljs) to switch to the cljs repl

yogthos19:07:08

after that I can do (require 'myapp.handlers) to load it

assoc-in19:07:20

Okay I think that may be the difference I normally launch via cider-jack-in

assoc-in19:07:42

I was able to do the workflow you laid out and it worked which is good now the question is why it doesn't work through cider launching everything

assoc-in19:07:57

@yogthos Okay I was able to get it to work inside emacs by setting the cider-repl-type variable in my cljs repl to "cljs" with (setq cider-repl-type "cljs") and now I can call (C-c C-k) on myapp.core and it works correctly. I am going to see if I can get it to work purely through cider-jack-in-clojurescript now. Thanks for the help!

assoc-in19:07:08

This is the workflow that I have working now 0. Cider-jack-in 1. run (start) in clj repl 2. run lein figwheel in terminal 3. run cider-connect "localhost:7002" 4. in this new repl run (cljs) 5. in that new repl run (M-x eval-expression "(setq cider-repl-type "cljs")") 6. Cider commands such as C-c M-n and C-c C-k work now!

yogthos21:07:57

Glad to hear it's working 😀