Search code examples
clojureleiningendatomicreagentcursive

Reagent Template with Datomic dependency causes wrong behavior in the leiningen REPL


I started a new Reagent project with lein new reagent sample-proj (you can use the latest to reproduce the problem). After a while I added the client-dependency for datomic (I had to exclude jetty-http, since it conflicted with ring-server).

[com.datomic/clj-client "0.8.606"
  :exclusions [org.eclipse.jetty/jetty-http]
]

Then I realized that in the lein repl you cannot run the server any more with (start-server). On localhost:3000 you just get a ERR_SOCKET_NOT_CONNECTED. There are no message in the console.

Even weirder is that, if I start the nREPL from within Cursive, everything works just fine.

Does anybody know what is going on here. I'm lost with this, since in cursive REPL figwhweel's app.js is not found. My project.clj is this: https://gist.github.com/frickm/4cfdba9ae812a909dfe8d5719c94718e.

thanks in advance
fricke


Solution

  • Perhaps it is a further dependency conflict? I can reproduce the issue with the steps that you mentioned.

    You might try additional exclusions (as seen in the Maven repo):

    [com.datomic/clj-client "0.8.606" :exclusions
       [org.eclipse.jetty/jetty-http org.eclipse.jetty/jetty-util
        org.eclipse.jetty/jetty-client]]