Lein repl not working


#1

Hi!
I have some problem with lein repl command in introduction-to-clojure code. When I trying start repl, I see this error:

Welcome to the bakery!
Available commands are:
grab Pick something up.
squeeze Squeeze whatever you are holding.
release Release whatever you are holding.
scoop If you are holding the cup, fill it with an ingredient.
add-to-bowl Add the ingredient you are holding to the mixing bowl.
mix Mix the ingredients in the bowl.
pour-into-pan Pour the contents of the bowl into the pan.
bake-pan Put the pan in the oven for a certain number of minutes.
cool-pan After baking, put the pan on the cooling racks to cool.
Returns the id of the cooling rack.
status Print out the status of the bakery.
start-over If you get lost, this command will reset the bakery.
go-to Go to the given location.
Possible locations are :prep-area, :fridge, and :pantry.
load-up Load an ingredient from storage to take to the prep area.
unload Unload an ingredient in the prep area.
get-morning-orders Get a new list of baking orders.
delivery Notify the delivery bot that something is ready to deliver.
bakery-help Print out this message.
Error loading refactor-nrepl.ns.clean-ns: clojure.lang.ArityException: Wrong number of args (2) passed to: StringReader, compiling:(abnf.clj:189:28)
Exception in thread “main” java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.ns.clean-ns/wrap-clean-ns in this context, compiling:(/private/var/folders/vt/l152ytg563v6zm9b29s4m8700000gn/T/form-init7104712646673143555.clj:1:9508)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3834)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6870)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3834)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6870)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6269)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5380)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3972)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6866)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.eval(Compiler.java:6924)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.ns.clean-ns/wrap-clean-ns in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:710)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
… 37 more
REPL server launch timed out.

This is my versions on Java & Leiningen:

MonsterBook:introduction-to-clojure InViZz$ java -version
java version "1.8.0_162"
Java™ SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot™ 64-Bit Server VM (build 25.162-b12, mixed mode)
MonsterBook:introduction-to-clojure InViZz$ lein version
Leiningen 2.8.1 on Java 1.8.0_162 Java HotSpot™ 64-Bit Server VM

lein deps said project had confusing dependencies:

MonsterBook:introduction-to-clojure InViZz$ lein deps :tree
Possibly confusing dependencies found:
[org.clojure/tools.nrepl “0.2.7”]
overrides
[cider/cider-nrepl “0.9.0-SNAPSHOT”] -> [org.clojure/tools.nrepl “0.2.10” :exclusions [org.clojure/clojure]]
Consider using these exclusions:
[cider/cider-nrepl “0.9.0-20150616.120440-43” :exclusions [org.clojure/tools.nrepl]]

[alembic “0.3.2”]
[lein-as-resource “2.5.0” :exclusions [[org.clojure/clojure]]]
[org.flatland/classlojure “0.7.0” :exclusions [[org.clojure/clojure]]]
[cider/cider-nrepl “0.9.0-20150616.120440-43”]
[org.tcrawley/dynapath “0.2.3” :exclusions [[org.clojure/clojure]]]
[clojure-complete “0.2.4” :exclusions [[org.clojure/clojure]]]
[lispcast/bakery “1.0.0”]
[org.clojure/clojure “1.8.0”]
[org.clojure/tools.nrepl “0.2.7”]
[refactor-nrepl “0.3.0-20150401.112429-28”]

Can anyone help with this please?


#2

Can anyone help with this please?)


#3

Hey @InViZz,

Thanks for your patience.

I’m wondering where those dependencies come from. Can I see your ~/.lein/profiles.clj? Perhaps there are incompatible libraries in there.

Eric


#4

Hi, @ericnormand,
thank you, looks like you right))

MonsterBook:introduction-to-clojure InViZz$ cat ~/.lein/profiles.clj
{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]
                  [refactor-nrepl "0.3.0-SNAPSHOT"]]
        :dependencies [[alembic "0.3.2"]
                       [org.clojure/tools.nrepl "0.2.7"]]}}

but where is this from?)


#5

I’m not sure. Maybe a previous installation? That’s a pretty old version of of cider! Back in the day, that was how you set it up. Now it can do that automatically. Remove those plugins and the tools.nrepl dep.


#6

Thank you, all working now)) :+1: