Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

figwheel-main not available #2597

Closed
cfraz89 opened this issue Feb 22, 2019 · 15 comments
Closed

figwheel-main not available #2597

cfraz89 opened this issue Feb 22, 2019 · 15 comments
Assignees

Comments

@cfraz89
Copy link

cfraz89 commented Feb 22, 2019

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" "../.."]}
@cichli
Copy link
Member

cichli commented Feb 22, 2019

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

@dpsutton
Copy link
Contributor

dpsutton commented Feb 22, 2019

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

@dpsutton
Copy link
Contributor

@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?

@cfraz89
Copy link
Author

cfraz89 commented Feb 25, 2019

@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.

@cichli
Copy link
Member

cichli commented Feb 25, 2019

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.

@cfraz89
Copy link
Author

cfraz89 commented Feb 26, 2019

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

@gerdint
Copy link
Contributor

gerdint commented Mar 1, 2019

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

@stale
Copy link

stale bot commented May 8, 2019

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!

@stale stale bot added the stale label May 8, 2019
@stale
Copy link

stale bot commented Jun 7, 2019

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

@PlumpMath
Copy link

PlumpMath commented Dec 13, 2019

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

@bbatsov
Copy link
Member

bbatsov commented Dec 13, 2019

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

@PlumpMath
Copy link

PlumpMath commented Dec 13, 2019

@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~*

@PlumpMath
Copy link

bhauman/figwheel-main#226
A lucky once.
However, it does not stick to it again.

@torgeir
Copy link

torgeir commented Jan 25, 2021

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 ✅

@dpsutton
Copy link
Contributor

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.

torgeir added a commit to torgeir/guitar that referenced this issue Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants