shadow-cljs: java.lang.NoSuchMethodError: com.cognitect.transit.TransitFactory.writer
lilactown opened this issue · 4 comments
Currently, with shadow-cljs 2.4.33 and [nubank/workspaces "1.0.0-preview6"]
, when I run cider-jack-in
I receive the following exception:
shadow-cljs - config: /Users/will/Code/lilactown/shadow-cljs.edn cli version: 2.4.33 node: v10.3.0
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - starting ...
Aug 08, 2018 3:49:28 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.8.Final
Aug 08, 2018 3:49:28 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.8.Final
Exception in thread "main" java.lang.NoSuchMethodError: com.cognitect.transit.TransitFactory.writer(Lcom/cognitect/transit/TransitFactory$Format;Ljava/io/OutputStream;Ljava/util/Map;Lcom/cognitect/transit/WriteHandler;Ljava/util/function/Function;)Lcom/cognitect/transit/Writer;
at cognitect.transit$writer.invokeStatic(transit.clj:157)
at cognitect.transit$writer.invoke(transit.clj:139)
at shadow.build.cache$write_stream.invokeStatic(cache.clj:9)
at shadow.build.cache$write_stream.invoke(cache.clj:8)
at shadow.build.cache$write_file.invokeStatic(cache.clj:26)
at shadow.build.cache$write_file.invoke(cache.clj:24)
at shadow.build.classpath$find_jar_resources.invokeStatic(classpath.clj:581)
at shadow.build.classpath$find_jar_resources.invoke(classpath.clj:552)
at shadow.build.classpath$find_resources.invokeStatic(classpath.clj:622)
at shadow.build.classpath$find_resources.invoke(classpath.clj:620)
at shadow.build.classpath$index_path_STAR_.invokeStatic(classpath.clj:842)
at shadow.build.classpath$index_path_STAR_.invoke(classpath.clj:839)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
at clojure.core$reduce.invokeStatic(core.clj:6747)
at clojure.core$reduce.invoke(core.clj:6730)
at shadow.build.classpath$index_classpath$fn__11559$fn__11560.invoke(classpath.clj:957)
at clojure.lang.Atom.swap(Atom.java:37)
at clojure.core$swap_BANG_.invokeStatic(core.clj:2344)
at clojure.core$swap_BANG_.invoke(core.clj:2337)
at shadow.build.classpath$index_classpath$fn__11559.invoke(classpath.clj:957)
at shadow.build.classpath$index_classpath.invokeStatic(classpath.clj:956)
at shadow.build.classpath$index_classpath.invoke(classpath.clj:951)
at shadow.build.classpath$index_classpath.invokeStatic(classpath.clj:953)
at shadow.build.classpath$index_classpath.invoke(classpath.clj:951)
at shadow.cljs.devtools.server.common$fn__16669.invokeStatic(common.clj:74)
at shadow.cljs.devtools.server.common$fn__16669.invoke(common.clj:72)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:657)
at clojure.core$apply.invoke(core.clj:652)
at shadow.runtime.services$start_one.invokeStatic(services.clj:98)
at shadow.runtime.services$start_one.invoke(services.clj:87)
at shadow.runtime.services$start_many$fn__8978.invoke(services.clj:127)
at shadow.runtime.services$start_many.invokeStatic(services.clj:126)
at shadow.runtime.services$start_many.invoke(services.clj:105)
at shadow.runtime.services$start_all.invokeStatic(services.clj:144)
at shadow.runtime.services$start_all.invoke(services.clj:139)
at shadow.cljs.devtools.server$start_system.invokeStatic(server.clj:279)
at shadow.cljs.devtools.server$start_system.invoke(server.clj:163)
at shadow.cljs.devtools.server$start_BANG_.invokeStatic(server.clj:391)
at shadow.cljs.devtools.server$start_BANG_.invoke(server.clj:324)
at shadow.cljs.devtools.server$start_BANG_.invokeStatic(server.clj:327)
at shadow.cljs.devtools.server$start_BANG_.invoke(server.clj:324)
at shadow.cljs.devtools.server$from_cli.invokeStatic(server.clj:523)
at shadow.cljs.devtools.server$from_cli.invoke(server.clj:499)
at shadow.cljs.devtools.cli$blocking_action.invokeStatic(cli.clj:143)
at shadow.cljs.devtools.cli$blocking_action.invoke(cli.clj:130)
at shadow.cljs.devtools.cli$main.invokeStatic(cli.clj:191)
at shadow.cljs.devtools.cli$main.doInvoke(cli.clj:146)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:661)
at clojure.core$apply.invoke(core.clj:652)
at shadow.cljs.devtools.cli$_main.invokeStatic(cli.clj:233)
at shadow.cljs.devtools.cli$_main.doInvoke(cli.clj:231)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.core$apply.invokeStatic(core.clj:657)
at clojure.main$main_opt.invokeStatic(main.clj:317)
at clojure.main$main_opt.invoke(main.clj:313)
at clojure.main$main.invokeStatic(main.clj:424)
at clojure.main$main.doInvoke(main.clj:387)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.main.main(main.java:37)
Downgrading to [nubank/workspaces "1.0.0-preview5"]
allows CIDER to start nREPL and connect successfully.
I had the same problem. I added the latest transit deps into my project, and that fixed it. Lein is getting a slightly older version, and shadow-cljs causes it to try a method that is in the latest Ithink.
🤔that's really weird. I'm not using lein, but just standalone shadow-cljs. It happens with older versions of shadow-cljs as well.
Depending on the latest transit-clj
did fix the immediate problem. However, I'm running into a new problem now 😭 #13
This is fixed as of shadow-cljs@2.6.3
. Older transit-clj
versions will be filtered out and replaced by the newer one.
Closed via upstream, please re-open if it still an issue.