So, I don't have a minimal repro, but I found out why I was getting the error, it is this code in closure.clj:
;; :bundle is just sugar
(= :bundle (:target opts))
(merge
{:hashbang false
:infer-externs true
:nodejs-rt false
:target :nodejs}
(when-not (:npm-deps opts)
{:npm-deps true}))
Inside add-implicit-options
. You can see the code makes :npm-deps
equal to true
when there are no :npm-deps
options configured. I think I could come up with a repro from this. But basically, if your current project does not have :npm-deps
defined in its options when compiling, because it does not use any, but it depends on another lib which has a deps.cljs
with some :npm-deps
in it, this condition will trigger and make :npm-deps
equal to true. In return, that will cause the following error:
Execution error (IllegalArgumentException) at cljs.closure/compute-upstream-npm-deps$fn (closure.clj:2441).
contains? not supported on type: java.lang.Boolean
This is with org.clojure/clojurescript {:mvn/version "1.10.773"}
and com.bhauman/figwheel-main {:mvn/version "0.2.7"}
@didibus I don't think the description of the problem is quite right - can you paste the whole trace please?