/
troubleshooting.html
634 lines (634 loc) · 25 KB
/
troubleshooting.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Troubleshooting :: CIDER Docs</title>
<link rel="canonical" href="https://docs.cider.mx/cider/troubleshooting.html">
<meta name="generator" content="Antora 2.0.0">
<link rel="stylesheet" href="../_/css/site.css">
<link rel="stylesheet" href="../_/css/site-extra.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
<link rel="icon" href="../_/img/favicon.ico" type="image/x-icon">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-140176314-1"></script>
<script>dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)};gtag('js',new Date());gtag('config','UA-140176314-1')</script>
</head>
<body class="article">
<header class="header" role="banner">
<nav class="navbar">
<div class="navbar-brand">
<div class="navbar-item">
<a href="https://cider.mx">CIDER</a>
<span class="separator">//</span>
<a href="https://docs.cider.mx">Docs</a>
</div>
<div class="navbar-item">
<input id="search-input" type="text" placeholder="Search docs">
</div>
<button class="navbar-burger" data-target="topbar-nav">
<span></span>
<span></span>
<span></span>
</button>
</div>
<div id="topbar-nav" class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item" href="#">Home</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Projects</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="https://github.com/clojure-emacs/cider">CIDER</a>
<a class="navbar-item" href="https://github.com/clojure-emacs/cider-nrepl">CIDER nREPL</a>
<a class="navbar-item" href="https://github.com/clojure-emacs/orchard">Orchard</a>
<a class="navbar-item" href="https://github.com/clojure-emacs/clojure-mode">clojure-mode</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Community</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="/cider/about/support.html">Support</a>
<a class="navbar-item" href="/cider/contributing.html">Contributing</a>
<a class="navbar-item" href="https://opencollective.com/cider">Open Collective</a>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="main-wrapper">
<div class="navigation-container" data-component="cider" data-version="master">
<aside class="navigation">
<div class="panels">
<div class="navigation-menu is-active" data-panel="menu">
<nav class="nav-menu">
<h3 class="title"><a href="index.html">CIDER</a></h3>
<ul class="nav-list">
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">Getting Started</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="basics/installation.html">Installation</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="basics/up_and_running.html">Up and Running</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="basics/clojurescript.html">ClojureScript</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">Using CIDER</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/interactive_programming.html">Interactive Programming</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/cider_mode.html">cider-mode</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/managing_connections.html">Managing Connections</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/code_completion.html">Code Completion</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/pretty_printing.html">Pretty Printing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/navigating_stacktraces.html">Navigating Stacktraces</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="usage/misc_features.html">Misc Features</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">Testing</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="testing/running_tests.html">Running Tests</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="testing/test_reports.html">Test Reports</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="testing/supported_libraries.html">Supported Libraries</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">Debugging</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="debugging/tracing.html">Tracing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="debugging/enlighten.html">Enlighten</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="debugging/debugger.html">Debugger</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="debugging/misc.html">Misc</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">Configuration</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="config/basic_config.html">Basic Configuration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="config/syntax_highlighting.html">Syntax Highlighting</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="config/indentation.html">Indentation</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="config/eldoc.html">Eldoc</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="config/misc.html">Misc</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="indent_spec.html">Indentation Specification</a>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">Using the REPL</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="repl/basic_usage.html">Basic Usage</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="repl/keybindings.html">Keybindings</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="repl/configuration.html">Configuration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="repl/history.html">REPL History</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="caveats.html">Caveats</a>
</li>
<li class="nav-item is-current-page" data-depth="1">
<a class="nav-link" href="troubleshooting.html">Troubleshooting</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="faq.html">FAQ</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="additional_packages.html">Additional Packages</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="additional_resources.html">Additional Resources</a>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="contributing.html">Contributing</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contributing/docs.html">Documentation</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contributing/hacking.html">Hacking on CIDER</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contributing/funding.html">Funding</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<span class="nav-text">About</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/history.html">History</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/team.html">Team</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/support.html">Support</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/changelog.html">Changelog</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/release_policy.html">Release Policy</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/logo.html">Logo</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="about/license.html">License</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="navigation-explore" data-panel="explore">
<div class="context">
<span class="title">CIDER</span>
<span class="version">master</span>
</div>
<ul class="components">
<li class="component is-current">
<span class="title">CIDER</span>
<ul class="versions">
<li class="version is-current is-latest">
<a href="index.html">master</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</aside>
</div>
<main class="main">
<div class="toolbar" role="navigation">
<button class="navigation-toggle"></button>
<a href="index.html" class="home-link"></a>
<nav class="crumbs" aria-label="breadcrumbs">
<ul>
<li class="crumb"><a href="index.html">CIDER</a></li>
<li class="crumb"><a href="troubleshooting.html">Troubleshooting</a></li>
</ul>
</nav>
<div class="edit-this-page"><a href="https://github.com/clojure-emacs/cider/edit/master/doc/modules/ROOT/pages/troubleshooting.adoc">Edit this Page</a></div>
</div>
<article class="doc">
<h1>Troubleshooting</h1>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>In case you run into issues here are a few tips that can help you diagnose the
problem.</p>
</div>
<div class="paragraph">
<p>Generally, it’s not a bad idea to configure Emacs to spit the backtrace on error
(instead of just logging the error in the <code>*Messages*</code> buffer). You can toggle
this behavior by using <kbd>M-x</kbd> <code>toggle-debug-on-error</code>.</p>
</div>
<div class="paragraph">
<p>Another good idea is to check the exchange of requests and responses between
CIDER and the nREPL server. You can find them in the <code>*nrepl-messages*</code> buffer,
provided you’ve enabled nREPL message logging.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_debugging_cider_commands"><a class="anchor" href="#_debugging_cider_commands"></a>Debugging CIDER commands</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Emacs features a super powerful built-in
<a href="http://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug.html">Emacs Lisp debugger</a>
and using it is the best way to diagnose problems of any kind.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Here’s a <a href="https://www.youtube.com/watch?v=odkYXXYOxpo">great crash
course</a> on using the debugger.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>To debug some command you need to do the following:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Figure out the name of the command you want to debug (e.g. by using <kbd>C-h k</kbd>
to see which command is associated with some keybinding)</p>
</li>
<li>
<p>Find the source of the command (e.g. by using <kbd>M-x</kbd> <code>find-function</code>
<kbd>RET</kbd> <code>function-name</code>)</p>
</li>
<li>
<p>Press <kbd>C-u C-M-x</kbd> while in the body of the function</p>
</li>
<li>
<p>Run the command again</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>At this point you’ll be dropped in the debugger and you can step forward until
you find the problem.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_profiling_cider_commands"><a class="anchor" href="#_profiling_cider_commands"></a>Profiling CIDER commands</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Emacs comes with a <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html">built-in
profiler</a>. Using
it is pretty simple:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Start it with <kbd>M-x</kbd> <code>profiler-start</code>.</p>
</li>
<li>
<p>Invoke some commands.</p>
</li>
<li>
<p>Get the report with <kbd>M-x</kbd> <code>profiler-report</code>.</p>
</li>
</ol>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
If you intend to share the profiling results with someone it’s a good idea to
save the report buffer to a file with <kbd>C-x C-w</kbd>.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_commonly_encountered_problems_and_how_to_solve_them"><a class="anchor" href="#_commonly_encountered_problems_and_how_to_solve_them"></a>Commonly encountered problems (and how to solve them)</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_repl_not_starting"><a class="anchor" href="#_repl_not_starting"></a>REPL not starting</h3>
<div class="paragraph">
<p>Make sure that your CIDER version matches your <code>cider-nrepl</code> version. Check
the contents of the <code>*Messages*</code> buffer for CIDER-related errors. You should
also check the nREPL messages passed between CIDER and nREPL in
<code>*nrepl-messages*</code>. If you don’t see anything useful there it’s time to bring
out the big guns.</p>
</div>
<div class="sect3">
<h4 id="_debugging_the_repl_init"><a class="anchor" href="#_debugging_the_repl_init"></a>Debugging the REPL init</h4>
<div class="paragraph">
<p>To debug CIDER’s REPL initialization it’s a good idea to hook into one of its
entry points. Add a breakpoint to <code>cider-make-repl</code> (<kbd>C-u C-M-x</kbd>, while
in its body). Next time you start CIDER you’ll be dropped in the debugger and
you can step forward until you find the problem.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_missing_nrepl_messages_buffer"><a class="anchor" href="#_missing_nrepl_messages_buffer"></a>Missing <code>*nrepl-messages*</code> buffer</h3>
<div class="paragraph">
<p>nREPL message logging is not enabled by default. Set <code>nrepl-log-messages</code> to <code>t</code>
to activate it. Alternatively you can use <kbd>M-x</kbd>
<code>nrepl-toggle-message-logging</code> to enable/disable logging temporary within your
current Emacs session. Note that enabling message logging can impact
performance.</p>
</div>
</div>
<div class="sect2">
<h3 id="_cider_debug_complains_that_it_failed_to_instrument"><a class="anchor" href="#_cider_debug_complains_that_it_failed_to_instrument"></a><code>cider-debug</code> complains that it “failed to instrument …​”</h3>
<div class="paragraph">
<p>In the REPL buffer, issue the following.</p>
</div>
<div class="literalblock">
<div class="content">
<pre>your.namespace> (ns cider.nrepl.middleware.util.instrument)
cider.nrepl.middleware.util.instrument> (def verbose-debug true)</pre>
</div>
</div>
<div class="paragraph">
<p>This will cause CIDER to print extensive information to the REPL buffer when you
try to debug an expression (e.g., with <kbd>C-u C-M-x</kbd>). <a href="https://github.com/clojure-emacs/cider-nrepl/issues/new">File an issue</a>
and copy this information.</p>
</div>
</div>
<div class="sect2">
<h3 id="_debugging_freezes_lock_ups"><a class="anchor" href="#_debugging_freezes_lock_ups"></a>Debugging freezes & lock-ups</h3>
<div class="paragraph">
<p>Sometimes a CIDER command might hang for a while (e.g. due to a bug or a
configuration issue). Such problems are super annoying, but are relatively easy
to debug. Here are a few steps you can take in such situations:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Do <kbd>M-x</kbd> <code>toggle-debug-on-quit</code></p>
</li>
<li>
<p>Reproduce the problem</p>
</li>
<li>
<p>Hit <kbd>C-g</kbd> around 10 seconds into the hang</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>This will bring up a backtrace with the entire function stack, including
function arguments. So you should be able to figure out what’s going on (or at
least what’s being required).</p>
</div>
</div>
<div class="sect2">
<h3 id="_warning_saying_you_have_to_use_nrepl_0_4_4"><a class="anchor" href="#_warning_saying_you_have_to_use_nrepl_0_4_4"></a>Warning saying you have to use nREPL 0.4.4+</h3>
<div class="paragraph">
<p>CIDER currently requires at least nREPL 0.4.4 to work properly (there were some
nasty bugs in older version and no support for tracking where some var was
defined in the source code). Leiningen users can add this to their
<code>profiles.clj</code> to force the proper dependency:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-clojure hljs" data-lang="clojure">{:repl {:dependencies [[nrepl/nrepl "x.y.z"]]}}</code></pre>
</div>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
Make sure you add the newer nREPL dependency to the <code>:dependencies</code> key instead
of <code>:plugins</code> (where <code>cider-nrepl</code> Lein plugin resides). That’s a pretty common
mistake.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Generally you’re advised to use the newest nREPL with CIDER, as bugs get fixed
in pretty much every release.</p>
</div>
</div>
<div class="sect2">
<h3 id="_missing_clojure_function_after_cider_update"><a class="anchor" href="#_missing_clojure_function_after_cider_update"></a>Missing clojure-…​ function after CIDER update</h3>
<div class="paragraph">
<p>Most likely you’ve updated CIDER, without updating <code>clojure-mode</code> as well.</p>
</div>
<div class="paragraph">
<p>CIDER depends on <code>clojure-mode</code> and you should always update them together, as
the latest CIDER version might depend on functionality present only in the latest
<code>clojure-mode</code> version.</p>
</div>
</div>
<div class="sect2">
<h3 id="_i_upgraded_cider_using_package_el_and_it_broke"><a class="anchor" href="#_i_upgraded_cider_using_package_el_and_it_broke"></a>I upgraded CIDER using <code>package.el</code> and it broke</h3>
<div class="paragraph">
<p>The built-in package manager isn’t perfect and sometimes it messes up. If you
just updated and encountered an error you should try the following before
opening an issue: Go into the <code>.emacs.d/elpa</code> directory, delete any folders
related to CIDER, restart Emacs and then re-install the missing packages. Note
that the order here matters.</p>
</div>
</div>
<div class="sect2">
<h3 id="_i_upgraded_cider_using_package_el_and_nothing_changed"><a class="anchor" href="#_i_upgraded_cider_using_package_el_and_nothing_changed"></a>I upgraded CIDER using <code>package.el</code> and nothing changed</h3>
<div class="paragraph">
<p>Emacs doesn’t load the new files, it only installs them on disk. To see the
effect of changes you have to restart Emacs.</p>
</div>
</div>
<div class="sect2">
<h3 id="_cider_complains_of_the_cider_nrepl_version"><a class="anchor" href="#_cider_complains_of_the_cider_nrepl_version"></a>CIDER complains of the <code>cider-nrepl</code> version</h3>
<div class="paragraph">
<p>This is a warning displayed on the REPL buffer when it starts, and usually looks like this:</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p><strong>WARNING:</strong> CIDER 0.18.0 requires cider-nrepl x.y.z, but you’re currently using cider-nrepl a.b.c. Some functionality may not work properly!</p>
</div>
</blockquote>
</div>
<div class="paragraph">
<p>where <code>a.b.c</code> might be an actual version, like <code>0.17.0</code>, or it might be <code>not installed</code> or <code>nil</code>.
The solution to this depends on what you see and on what you’re doing.</p>
</div>
<div class="sect3">
<h4 id="_you_see_a_number_like_x_x_x_and_youre_starting_the_repl_with_cider_connect"><a class="anchor" href="#_you_see_a_number_like_x_x_x_and_youre_starting_the_repl_with_cider_connect"></a>You see a number like <code>X.X.X</code>, and you’re starting the REPL with <code>cider-connect</code></h4>
<div class="paragraph">
<p>Your project specifies the wrong version for the cider-nrepl middleware. See the
<a href="installation/#ciders-nrepl-middleware">instructions</a>
on the Installation section.</p>
</div>
</div>
<div class="sect3">
<h4 id="_you_see_not_installed_or_nil_and_youre_starting_the_repl_with_cider_connect"><a class="anchor" href="#_you_see_not_installed_or_nil_and_youre_starting_the_repl_with_cider_connect"></a>You see <code>not installed</code> or <code>nil</code>, and you’re starting the REPL with <code>cider-connect</code></h4>
<div class="paragraph">
<p>To use <code>cider-connect</code> you need to add the cider-nrepl middleware to your project. See the
<a href="installation/#ciders-nrepl-middleware">instructions</a>
on the Installation section.</p>
</div>
</div>
<div class="sect3">
<h4 id="_you_see_not_installed_or_nil_and_youre_starting_the_repl_with_cider_jack_in"><a class="anchor" href="#_you_see_not_installed_or_nil_and_youre_starting_the_repl_with_cider_jack_in"></a>You see <code>not installed</code> or <code>nil</code>, and you’re starting the REPL with <code>cider-jack-in</code></h4>
<div class="ulist">
<ul>
<li>
<p>Do <code>C-h v cider-inject-dependencies-at-jack-in</code>, and check that this variable is non-nil.</p>
</li>
<li>
<p>Make sure your project depends on at least Clojure <code>1.7.0</code>.</p>
</li>
<li>
<p>If you use Leiningen, make sure your <code>lein --version</code> is at least <code>2.9.0</code>.</p>
</li>
<li>
<p>If you use Boot and you’ve changed <code>cider-boot-parameters</code>, that’s probably the cause.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>If the above doesn’t work, you can try specifying the cider-nrepl middleware
manually, as per the
<a href="installation/#ciders-nrepl-middleware">instructions</a>
on the Installation section.</p>
</div>
</div>
<div class="sect3">
<h4 id="_you_see_a_number_like_x_x_x_and_youre_starting_the_repl_with_cider_jack_in"><a class="anchor" href="#_you_see_a_number_like_x_x_x_and_youre_starting_the_repl_with_cider_jack_in"></a>You see a number like <code>X.X.X</code>, and you’re starting the REPL with <code>cider-jack-in</code></h4>
<div class="paragraph">
<p>This means you’re manually adding the cider-nrepl middleware in your project,
but you shouldn’t do that because <code>cider-jack-in</code> already does that for
you. Look into the following files, and ensure you’ve removed all references to
<code>cider-nrepl</code> and <code>nrepl</code>: <code>project.clj</code>, <code>build.boot</code>,
<code>~/.lein/profiles.clj</code> and <code>~/.boot/profile.boot</code>.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_i_get_some_error_related_to_refactor_nrepl_on_startup"><a class="anchor" href="#_i_get_some_error_related_to_refactor_nrepl_on_startup"></a>I get some error related to refactor-nrepl on startup</h3>
<div class="paragraph">
<p>The package <code>clj-refactor</code> would normally inject its own middleware on
<code>cider-jack-in</code>, just as CIDER itself would. Usually that’s not a
problem, as long as you’re using compatible versions of CIDER and
<code>clj-refactor</code>, but if you’re getting some error probably that’s not
the case. You’ve got two options to solve this:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Use compatible versions of the two projects (e.g. their most recent
snapshots or most recent stable releases)</p>
</li>
<li>
<p>Disable the <code>clj-refactor</code> middleware injection:</p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-lisp hljs" data-lang="lisp">(setq cljr-inject-dependencies-at-jack-in nil)</code></pre>
</div>
</div>
</div>
</div>
</div>
</article>
</main>
</div>
<footer class="footer">
<p>Copyright (C) 2012-2019 <a href="https://metaredux.com">Bozhidar Batsov</a> and <a href="https://cider.mx">CIDER</a> contributors.</p>
</footer>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript">
docsearch({
apiKey: '1f3d78fd63fcb687dcc1312aab02a2de',
indexName: 'cider',
inputSelector: '#search-input',
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
<script src="../_/js/site.js"></script>
<script async src="../_/js/vendor/highlight.js"></script>
</body>
</html>