This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-08
Channels
- # beginners (76)
- # boot (13)
- # cider (3)
- # clara (7)
- # cljs-dev (254)
- # cljsrn (5)
- # clojure (20)
- # clojure-austin (2)
- # clojure-chicago (4)
- # clojure-dev (7)
- # clojure-russia (5)
- # clojure-spec (18)
- # clojurescript (68)
- # cursive (8)
- # datascript (3)
- # datomic (8)
- # garden (1)
- # hoplon (3)
- # lambdaisland (4)
- # luminus (20)
- # mount (19)
- # off-topic (30)
- # om (10)
- # onyx (8)
- # parinfer (14)
- # precept (7)
- # reagent (9)
- # unrepl (3)
- # untangled (72)
- # vim (4)
- # yada (1)
you could use a with
tag perhaps https://github.com/yogthos/Selmer#with
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?
@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?
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"the user
namespace should already have a function called cljs
that you can run to connect to cljs repl as well
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.
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
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
@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!
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!