1

I am completely new to Emacs so apologies if this is a stupid question. I am following the Emacs configuration as outlined in Clojure for the Brave and True. Unfortunately, when trying to start the REPL from within Emacs (lein repl works fine), it just sits there for a bit before returning the following error message:

[nREPL] Starting server via "c:/Users/martin/clojure/lein.bat" update-in :dependencies conj ^"[nrepl \^"0.5.3\^"]^" -- update-in :plugins conj ^"[cider/cider-nrepl \^"0.20.0\^"]^" -- repl :headless :host localhost...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Exception in thread "main" Syntax error compiling var at (C:\Users\martim09\AppData\Local\Temp\form-init2119285984916302166.clj:1:8990).

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7114)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.analyze(Compiler.java:6745)

    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.analyze(Compiler.java:6745)

    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.access$300(Compiler.java:38)

    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6384)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.analyze(Compiler.java:6745)

    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6120)

    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5467)

    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4029)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7104)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.eval(Compiler.java:7173)

    at clojure.lang.Compiler.eval(Compiler.java:7166)

    at clojure.lang.Compiler.eval(Compiler.java:7166)

    at clojure.lang.Compiler.load(Compiler.java:7635)

    at clojure.lang.Compiler.loadFile(Compiler.java:7573)

    at clojure.main$load_script.invokeStatic(main.clj:452)

    at clojure.main$init_opt.invokeStatic(main.clj:454)

    at clojure.main$init_opt.invoke(main.clj:454)

    at clojure.main$initialize.invokeStatic(main.clj:485)

    at clojure.main$null_opt.invokeStatic(main.clj:519)

    at clojure.main$null_opt.invoke(main.clj:516)

    at clojure.main$main.invokeStatic(main.clj:598)

    at clojure.main$main.doInvoke(main.clj:561)

    at clojure.lang.RestFn.applyTo(RestFn.java:137)

    at clojure.lang.Var.applyTo(Var.java:705)

    at clojure.main.main(main.java:37)

Caused by: java.lang.RuntimeException: Unable to resolve var: cider.nrepl/wrap-apropos 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:7106)

    ... 35 more

Subprocess failed


error in process sentinel: Could not start nREPL server: Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Exception in thread "main" Syntax error compiling var at (C:\Users\martim09\AppData\Local\Temp\form-init2119285984916302166.clj:1:8990).

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7114)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.analyze(Compiler.java:6745)

    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.analyze(Compiler.java:6745)

    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.access$300(Compiler.java:38)

    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6384)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.analyze(Compiler.java:6745)

    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6120)

    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5467)

    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4029)

    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7104)

    at clojure.lang.Compiler.analyze(Compiler.java:6789)

    at clojure.lang.Compiler.eval(Compiler.java:7173)

    at clojure.lang.Compiler.eval(Compiler.java:7166)

    at clojure.lang.Compiler.eval(Compiler.java:7166)

    at clojure.lang.Compiler.load(Compiler.java:7635)

    at clojure.lang.Compiler.loadFile(Compiler.java:7573)

    at clojure.main$load_script.invokeStatic(main.clj:452)

    at clojure.main$init_opt.invokeStatic(main.clj:454)

    at clojure.main$init_opt.invoke(main.clj:454)

    at clojure.main$initialize.invokeStatic(main.clj:485)

    at clojure.main$null_opt.invokeStatic(main.clj:519)

    at clojure.main$null_opt.invoke(main.clj:516)

    at clojure.main$main.invokeStatic(main.clj:598)

    at clojure.main$main.doInvoke(main.clj:561)

    at clojure.lang.RestFn.applyTo(RestFn.java:137)

    at clojure.lang.Var.applyTo(Var.java:705)

    at clojure.main.main(main.java:37)

Caused by: java.lang.RuntimeException: Unable to resolve var: cider.nrepl/wrap-apropos 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:7106)

    ... 35 more

Subprocess failed

Can anybody tell me what I would need to do to get it working?

I have tried updating the packages according to instructions found here but am still no further forward.

Just to provide a bit more information, this is what the project.clj says: enter image description here

  • A syntax error in nrepl.clj... could you link (not copy entirely) your .emacs file , And tell us what's in your setup. system emacs version cider version and so on.. BTW the buffer in the screenshot is not in cider-mode but in clojure-mode – manandearth Feb 19 at 12:09
  • also... as I can't reproduce this, could you run lein clean in a shell in the project's folder and try again, please? – manandearth Feb 19 at 12:54
  • Hi @manandearth, sure, the contents of .emacs.d can actually be found here: github.com/flyingmachine/emacs-for-clojure It should show you exactly what is in the setup file..I am assuming this is what you mean? Emcas is version 26.1, cider-0.20.0.. – Johnny Feb 19 at 12:57
  • I ran lein clean in a shell in the prjoect's folder but unfortunately it didn't change anything. Still get the same message when trying to run M-x cider-jack-in.. – Johnny Feb 19 at 13:01
  • Not sure if this helps or not but I opened the project in Nightcode and have absolutely no problems when hitting "Run with REPL".. – Johnny Feb 19 at 13:03
0

I had the same problem, ... Error loading cider.nrepl: Syntax error compiling at (cider/nrepl.clj:1:1).

Found way to solution via https://github.com/luminus-framework/luminus-nrepl/issues/6:

suryaaditya commented on Feb 28 adding the plugin to project.clj [cider/cider-nrepl "0.21.1"] seems to solve this issue.

running cider-jack-in now gave another error, a java compile error.

But after lein clean (don't know if needed) and manually selecting install of cider 0.21.1 in Emacs it works!

0

The answer of @johnny from the comments works for me:

  • This answer seem to be very time-dependent (I suspect that a few years from now it probably won't apply any more). Could you add a few words to explain what kind of upgrading is necessary (e.g. "this is a known bug in the version NN.MM of foo mode")? Also explain what you mean by "fourth instruction" since any day now this may turn into the third or the fifth or whatever else. – Stefan Jul 4 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.