I have a project which runs perfectly when I use watch app
but when I release with release app
it gives some failed to load
errors. How can I solve such problem.
which shadow-cljs version is this with? I fixed a couple issues regarding $jscomp
not too long ago
otherwise the easiest way to fix this increasing the :compiler-options {:output-feature-set :es6}
or even higher :es7
, :es8
depending on how many really old browsers you need to support
in the older versions it was sometimes enough to delete the .shadow-cljs/builds
cache
I had "shadow-cljs": "^2.8.51" looks like I am far behind the current version. I don't need to support any old browser so I will just start to use latest version thank you
using latest version and deleting builds solved my problem
the error can be seen here -> https://uygulama.spill.web.tr/nightly
Sorry if this is an inappropriate channel but I am wondering how I can debug an import error.
I am using luminus with the +shadow-cljs
setting.
I've added d3-dag
to my :npm-deps
in project.clj
. I've also tried installing d3-dag
manually from the command line.
However, when I try to require it like this:
(require '["d3-dag" :as d3])
I get the error:
[:app] Compiling ...
[:app] Build failure:
IllegalArgumentException: No matching field found: getSourceName for class com.google.javascript.jscomp.JSError
clojure.lang.Reflector.getInstanceField (Reflector.java:397)
clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:440)
shadow.build.closure/js-error-xf/fn--45167 (closure.clj:536)
clojure.core/map/fn--5862/fn--5863 (core.clj:2742)
clojure.core.protocols/iter-reduce (protocols.clj:49)
clojure.core.protocols/fn--8140 (protocols.clj:75)
clojure.core.protocols/fn--8140 (protocols.clj:75)
clojure.core.protocols/fn--8088/G--8083--8101 (protocols.clj:13)
clojure.core/transduce (core.clj:6884)
clojure.core/into (core.clj:6899)
clojure.core/into (core.clj:6887)
shadow.build.closure/throw-errors! (closure.clj:1093)
shadow.build.closure/throw-errors! (closure.clj:1088)
shadow.build.closure/convert-sources-simple* (closure.clj:1843)
shadow.build.closure/convert-sources-simple* (closure.clj:1703)
shadow.build.closure/convert-sources-simple (closure.clj:1989)
shadow.build.closure/convert-sources-simple (closure.clj:1941)
shadow.build.compiler/maybe-closure-convert (compiler.clj:1082)
shadow.build.compiler/maybe-closure-convert (compiler.clj:1075)
shadow.build.compiler/compile-all (compiler.clj:1333)
shadow.build.compiler/compile-all (compiler.clj:1194)
shadow.build.api/compile-sources (api.clj:256)
shadow.build.api/compile-sources (api.clj:248)
shadow.build/compile (build.clj:398)
shadow.build/compile (build.clj:389)
shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:314)
shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:300)
shadow.cljs.devtools.server.worker.impl/do-resource-update (impl.clj:936)
shadow.cljs.devtools.server.worker.impl/do-resource-update (impl.clj:899)
shadow.cljs.devtools.server.util/server-thread/fn--48207/fn--48208/fn--48216 (util.clj:285)
shadow.cljs.devtools.server.util/server-thread/fn--48207/fn--48208 (util.clj:284)
shadow.cljs.devtools.server.util/server-thread/fn--48207 (util.clj:257)
java.lang.Thread.run (Thread.java:831)
Any hints on how to start debugging this would be appreciated.
The error is specific to the d3-dag
package, since requiring ["react" :as r]
works.@endrebak85 that is cased by a dependency conflict on the closure-compiler version. see https://shadow-cljs.github.io/docs/UsersGuide.html#failed-to-load
Thank you. I was experiencing some other weirdness too (dunno if they are due to shadow-cljs
though). Will fix it and see if they disappear. Do you think these error messages might have the same cause? https://clojurians.slack.com/archives/C053AK3F9/p1620220881170500
@endrebak85 that happens when you use a too old shadow-cljs version with jdk15+, need to upgrade shadow-cljs
cant' remember which version added jdk15 compatibility, but at least 2.11.x is likely required. current is 2.12.6