Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

unable to start REPL due to Error loading cider.piggieback #34

Open
pabl0rg opened this issue Mar 15, 2019 · 6 comments
Open

unable to start REPL due to Error loading cider.piggieback #34

pabl0rg opened this issue Mar 15, 2019 · 6 comments

Comments

@pabl0rg
Copy link

pabl0rg commented Mar 15, 2019

2019-03-15 09:13:54.663 [main] INFO  ventas.config - Loading configuration
2019-03-15 09:13:54.680 [main] DEBUG ventas.config - {:database {:url datomic:free://localhost:4334/ventas}, :server {:port 3450, :host localhost}, :elasticsearch {:index ventas, :port 9200, :host 127.0.0.1}, :auth-secret CHANGEME}
Error loading cider.piggieback: java.lang.RuntimeException: No such var: ieval/queue-eval, compiling:(cider/piggieback.clj:190:3)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context, compiling:(/private/var/folders/2g/191qqhsn24769l06q1jzy7tw0000gn/T/form-init1530137244909603440.clj:1:2980)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.access$300(Compiler.java:38)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.eval(Compiler.java:7059)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context
	at clojure.lang.Util.runtimeException(Util.java:221)
	at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	... 36 more
Subprocess failed
REPL server launch timed out.
@gacelita
Copy link
Owner

I'm unable to reproduce this, but I have removed piggieback as per https://shadow-cljs.github.io/docs/UsersGuide.html#_embedded_nrepl_server

Pull and tell me how it goes.

@pabl0rg
Copy link
Author

pabl0rg commented Mar 18, 2019

Thanks. I got past that problem but hit another. I am very new at using lein/clojure so that may be the problem.

(base) Arpanet kemik-ventas> lein repl
Tried to load org.tcrawley/dynapath version 0.2.3 but 1.0.0 was already loaded.
Tried to load commons-io version 2.5 but 2.6 was already loaded.
Retrieving nrepl/nrepl/0.5.3/nrepl-0.5.3.pom from clojars
Retrieving nrepl/bencode/1.0.0/bencode-1.0.0.pom from clojars
2019-03-18 15:55:20.598 [main] INFO  ventas.config - Loading configuration
2019-03-18 15:55:20.619 [main] DEBUG ventas.config - {:database {:url datomic:free://localhost:4334/ventas}, :server {:port 3450, :host localhost}, :elasticsearch {:index ventas, :port 9200, :host 127.0.0.1}, :auth-secret CHANGEME}
Error loading shadow.cljs.devtools.server.nrepl: java.io.FileNotFoundException: Could not locate clojure/tools/nrepl/middleware__init.class or clojure/tools/nrepl/middleware.clj on classpath., compiling:(shadow/cljs/devtools/server/nrepl.clj:1:1)
Error loading shadow.cljs.devtools.server.nrepl: java.io.FileNotFoundException: Could not locate clojure/tools/nrepl/middleware__init.class or clojure/tools/nrepl/middleware.clj on classpath., compiling:(shadow/cljs/devtools/server/nrepl.clj:1:1)
Error loading shadow.cljs.devtools.server.nrepl: java.io.FileNotFoundException: Could not locate clojure/tools/nrepl/middleware__init.class or clojure/tools/nrepl/middleware.clj on classpath., compiling:(shadow/cljs/devtools/server/nrepl.clj:1:1)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: shadow.cljs.devtools.server.nrepl/cljs-load-file in this context, compiling:(/private/var/folders/2g/191qqhsn24769l06q1jzy7tw0000gn/T/form-init3777534392533582629.clj:1:3620)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.access$300(Compiler.java:38)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.eval(Compiler.java:7059)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: shadow.cljs.devtools.server.nrepl/cljs-load-file in this context
	at clojure.lang.Util.runtimeException(Util.java:221)
	at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	... 36 more
^C(base) Arpanet kemik-ventas> lein --version
Tried to load org.tcrawley/dynapath version 0.2.3 but 1.0.0 was already loaded.
Tried to load commons-io version 2.5 but 2.6 was already loaded.
Leiningen 2.9.1 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM

@gacelita
Copy link
Owner

gacelita commented Mar 18, 2019 via email

@sologiler
Copy link

I have the same problem. I'm running lein repl and I get the same error as @pabl0rg

I have removed my .lein/profiles.clj file just to be sure that this is not somehow related.

As I understand from the error message the clojure/tools/nrepl/middleware__init.class is not on the classpath.

@gacelita
Copy link
Owner

gacelita commented Apr 3, 2019

I think you need to upgrade leiningen, or create a profiles.clj with:

{:user {:dependencies [[nrepl "0.3.1"]
                       [thheller/shadow-cljs "2.7.21" :exclusions [org.clojure/tools.reader
                                                                   nrepl
                                                                   com.google.guava/guava
                                                                   org.clojure/tools.cli
                                                                   commons-codec
                                                                   commons-io
                                                                   ring/ring-core]]]}}

Both lein and shadow want to use the new nrepl version, and it seems yours is trying to use clojure.tools.nrepl.* namespaces instead of nrepl.* as described in here

Please tell me how that goes.

@gacelita
Copy link
Owner

@sologiler @pabl0rg I believe this is solved in master (and in 0.1.1, in clojars). As it turns out, I was using the shadow.cljs.devtools.server.nrepl ns for requiring the shadow-cljs middleware, but ventas uses nrepl 0.4+, so shadow.cljs.devtools.server.nrepl04 is needed. thteller plans to make this the default, but that's not the case atm, so ventas uses shadow.cljs.devtools.server.nrepl04 explicitly. Please tell me if it works. (It works for me, as I was able to reproduce this problem)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants