This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-05
Channels
- # babashka (14)
- # beginners (62)
- # calva (1)
- # cider (54)
- # clj-kondo (3)
- # cljdoc (15)
- # cljs-dev (2)
- # clojure (180)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-spec (10)
- # clojure-uk (39)
- # clojurescript (85)
- # core-async (9)
- # core-logic (1)
- # core-typed (5)
- # data-science (27)
- # datomic (2)
- # emacs (15)
- # figwheel-main (98)
- # fulcro (26)
- # graphql (15)
- # helix (1)
- # jobs-discuss (26)
- # kaocha (1)
- # off-topic (54)
- # other-lisps (1)
- # re-frame (21)
- # reagent (1)
- # reitit (3)
- # shadow-cljs (49)
- # spacemacs (12)
- # specter (5)
- # xtdb (2)
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"}