Fork me on GitHub
#conjure
<
2024-05-08
>
reefersleep14:05:46

I keep getting

; Sponsored by @trev-dev ❤
; --------------------------------------------------------------------------------
; localhost:52680 (ECONNREFUSED): .nrepl-port
; --------------------------------------------------------------------------------
; localhost:52680 (disconnected): .nrepl-port
After something odd happened in nvim and I force quit it.

reefersleep14:05:27

I did killall nvim successfully. But now I can't connect to the Conjure repl.

reefersleep14:05:19

It's a small babashka project.

reefersleep14:05:05

Maybe there's a rogue Conjure process I need to kill?

reefersleep14:05:16

Doesn't matter if I change the port.

Samuel Ludwig14:05:25

Is there by chance an .nrepl-port file still in your filetree?

reefersleep14:05:50

Yes, that's where I changed the port

Samuel Ludwig14:05:59

try and rm that file?

reefersleep14:05:33

Now I started a babashka repl in a different way,

nrepl {:requires ([babashka.fs :as fs]
                                    [babashka.nrepl.server :as srv])
                         :task (do (srv/start-server! {:host "localhost"
                                                       :port 1339})
                                   (spit ".nrepl-port" "1339")
                                   (-> (Runtime/getRuntime)
                                       (.addShutdownHook
                                         (Thread. (fn [] (fs/delete ".nrepl-port")))))
                                   (deref (promise)))}}

reefersleep14:05:40

(from our bb.edn)

reefersleep14:05:44

and it seems to connect fine to that

reefersleep15:05:14

I made do with that server. Thanks, @U0482NW9KL1 🙂

reefersleep15:05:27

Guess I'll have to reboot at some point, and that'll fix my problem, I assume

Samuel Ludwig15:05:30

👋 , yea the .nrepl-port file not getting cleared on an abnormal exit has bitten me many a timee

Oliver Marshall16:05:54

FYI @U0AQ3HP9U, the .nrepl-port file is just where the current port is stored for other tools to pick up on

reefersleep18:05:04

One of my team mates made that bb.edn. Maybe his setup requires knowing the port.