Cider: figwheel-main not available

Created on 22 Feb 2019  Â·  15Comments  Â·  Source: clojure-emacs/cider

Since updating cider, it seems to no longer able to detect and start fighwheel-main in my project. This setup was previously working with a version of cider from late last year.

Environment:
;; Connected to nREPL server - nrepl://localhost:36971
;; CIDER 0.21.0snapshot (package: 20190216.2255), nREPL 0.6.0
;; Clojure 1.9.0, Java 1.8.0_201

Messages:

[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/piggieback {:mvn/version "0.4.0"} cider/cider-nrepl {:mvn/version "0.21.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"]'...
[nREPL] server started on 34675
[nREPL] Establishing direct connection to localhost:34675 ...
[nREPL] Direct connection to localhost:34675 established
[nREPL] Establishing direct connection to localhost:34675 ...
[nREPL] Direct connection to localhost:34675 established
error in process filter: user-error: Figwheel-main is not available.  Please check https://docs.cider.mx/en/latest/clojurescript
error in process filter: Figwheel-main is not available.  Please check https://docs.cider.mx/en/latest/clojurescript

deps.edn

{:deps {bidi {:mvn/version "2.1.4"}
        cljsjs/create-react-class {:mvn/version "15.6.3-0"}
        cljsjs/csv {:mvn/version "1.1.1-0"}
        cljsjs/react {:mvn/version "16.0.0-0"}
        cljsjs/react-dom {:mvn/version "16.0.0-0"}
        com.andrewmcveigh/cljs-time {:mvn/version "0.5.2"}
        org.clojure/clojure {:mvn/version "1.9.0"}
        org.clojure/clojurescript {:mvn/version "1.10.339"}
        org.clojure/core.async {:mvn/version "0.4.474"}
        org.omcljs/om {:mvn/version "1.0.0-beta4"}
        prismatic/dommy {:mvn/version "1.1.0"}
        venantius/accountant {:mvn/version "0.2.4"}}
 :aliases {:cljs {:main-opts ["-m" "cljs.main"]}
           :fig {:extra-deps {com.bhauman/figwheel-main {:mvn/version "0.2.0"}
                              com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
                 :main-opts ["-m" "figwheel.main"]}
           :kibit {:extra-deps {jonase/kibit {:mvn/version "0.1.6"}}
                   ; this is very slow, should find better way to invoke
                   :main-opts ["-e"
                               "(require, '[kibit.driver,:as,k]),
                                  (k/external-run,[\"lib\"],nil)"]}
           :cljfmt {:extra-deps {cljfmt {:mvn/version "0.6.4"}}
                    :main-opts ["-m" "cljfmt.main"]}}
 :paths ["lib" "main" "../.."]}
bug stale

All 15 comments

I will take a look this evening, in the meantime would you be able to try with [cider/piggieback "0.4.1-SNAPSHOT"]?

Figwheel is behind the alias :fig but the invocation doesn't include this alias. Were you using a way to set aliases and perhaps that has changed?

/usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/piggieback {:mvn/version "0.4.0"} cider/cider-nrepl {:mvn/version "0.21.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"]'

^^ no -A:fig

@cfraz89 have you resolved this issue? If not, can you check for any dir-locals in the project directory? As far as I can think, CIDER wouldn't add figwheel or that alias automatically so perhaps the method to tell which aliases to use has changed since your last version?

@dpsutton I am using a .dir-locals:

((clojurescript-mode . ((cider-default-cljs-repl . figwheel-main)
            (cider-preferred-build-tool . clojure-cli)
            (cider-figwheel-main-default-options . ":dev"))))

This hasn't changed lately. Have tried adding -A:fig into the launch parameters didn't seem to make a difference though.

@cichli No difference unfortunately.

I had a chance to try your deps.edn and .dir-locals.el out, and I got it working using -R:fig rather than -A:fig – we only want to include :extra-deps, not :main-opts. You could add (cider-clojure-cli-global-options . "-R:fig") to your .dir-locals.el.

Aha, @cichli -R does indeed work. Thankyou. Any idea why it wasn't necessary in the past?

I had this same issue on CIDER 0.19.0. The solution suggested by @cichli worked.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

figwheel-main (clj-new template) + cider + emacs + cli (deps.edn)
= not connected
g,.g

Most often the problem is not including the figwheel profile in the jack-in command.

@bbatsov please more hint.
Clojure works well....
when start cider-jack-in-cljs... only clj REPL is made. Onz..
.
what is figwheel profile?;

screen03

g,.g Thanks~*

https://github.com/bhauman/figwheel-main/issues/226
A lucky once.
However, it does not stick to it again.

I'll drop this here just in case someone else skims these kinds of docs like me;
Came here with the same error as the one reported, using clojure-cli, and after having read https://docs.cider.mx/cider/basics/clojurescript. So I went back and discovered I had missed the .dir-locals.el with ((clojurescript-mode . ((cider-clojure-cli-global-options . "-A:fig")))). That, of course, works ✅

as of today the cider-clojure-cli-global-options have been renamed to cider-clojure-cli-aliases to in the aid of clarity. It will still work under the old name but hopefully give you a warning about the newer name.

Was this page helpful?
0 / 5 - 0 ratings