hlolli / om-next-template

Om next template with figwheel and SCSS hot-reload.
14 stars 1 forks source link

`No such namespace: figwheel-sidecar.repl` error when using cider-jack-in-clojurescript #1

Open albertchan opened 7 years ago

albertchan commented 7 years ago

Hi, I tried starting up the template using the steps provided in the README. However, when I tried cider-jack-in-clojurescript I ran into the following error

clojure.lang.ExceptionInfo: No such namespace: figwheel-sidecar.repl, could not locate figwheel_sidecar/repl.cljs

Is there something I'm doing wrong? Many thanks!

hlolli commented 7 years ago

I updated the deps, maybe that was causing it. Otherwise, use normal cider-jack-in and when the repl is open run (load-file "script/figwheel.clj"), the script will in the background run piggyback, effectively changeing clojure repl into figwheel browser repl. The difference of the two cider-jack-in methods it that with clojurescript you have two repls running and you'd need to change the cider setting to set the correct clojurescript repl on default, I believe it's still rhino repl on default.

albertchan commented 7 years ago

Thanks! I figured out my problem was not configuring Emacs properly. I had to add the following into my init.el:

(setq cider-cljs-lein-repl
      "(do (require 'figwheel-sidecar.repl-api)
           (figwheel-sidecar.repl-api/start-figwheel!)
           (figwheel-sidecar.repl-api/cljs-repl))")

I'm still new to clojure and clojurescript so I haven't figured out the preferred dev setup and toolchains.

hlolli commented 7 years ago

Yes that's an alternative, the auto SCSS hot-reload won't work this way if that's not a problem for you.

albertchan commented 7 years ago

Hmm... I do want auto SCSS hot-reload, so I'll have to do a little more investigating.

albertchan commented 7 years ago

Hi there, I've removed the custom config in my init.el from my previous comment. I'm using the normal cider-jack-in and (load-file "script/figwheel.clj") method to launch the script. Everything works great now except style.scss is not being hot-reloaded automatically. In fact, I've removed /resources/public/css/style.css to test and it appears node-sass is not even compiling the source scss file from the figwheel script.

Are you getting the same? Thanks.