Fork me on GitHub

I’ve been trying to reproduce an issue I had with deercreeklabs/capsule using the cljs repl:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}
        deercreeklabs/capsule {:mvn/version "0.3.9"}}}
$ clj --main cljs.main --repl
> (require 'deercreeklabs.capsule)
=> No such namespace: pako, could not locate pako.cljs, pako.cljc
That issue is different from the one I tried to reproduce: Anyone an idea how to get around that? Am I doing something wrong?


not sure how you are supposed to get them installed with cljs.main


One alternative is not to use cljs at all for installing so :install-deps false. You still need to specify them in the :npm-deps map though, unless you are in lumo and you only target is node. Lumo uses node directly so no need for listing them.


To install NPM deps with cljs.main you can

clj -m cljs.main -co '{:npm-deps {:pako "1.0.6" :websocket "1.0.25"} :install-deps true}' -r


No problem. If you're curious about cljs interop and would like some examples you can check out this repo - - should be a bunch of real use case examples that you might find useful


Very nice. Thank you!


using the audio object I am trying to allow repeated calls of my play function to stop and replay the audio clip. The doto form does not work, but the line-by line manipulation of the same audio object. Is this some gotcha I missed

;; Doesn't work
  (doto clip
    #(set! (.-currentTime %) 0.0)
  (.pause clip)
  (set! (.-currentTime clip) 0.0)
  (.play clip)
  (add-playing! clip)


@theeternalpulse think about doto + ->


Ah I thought it was like the thread first but since many is objects didn't have functions that return the object it was simply passing in the top form to each body form. This makes sense.


Hello guys, quick question: If you were asked to make .cljc web components packaged as a library for both reagent and server-side hiccup. What would be your strategy, especially for handling styling/css?


I'm not sure if I got it right, but is ^:dynamic actually doing something in cljs? I mean, I'm trying this in klipse:

(def *dyn* [2 0 1 8])

(defn add-1 []
  (map (partial + 1) *dyn*))
(println (add-1))

(binding [*dyn* [4 2]]
  (println (add-1)))

(println (add-1))


and the result is the same with or without ^:dynamic in defing *dyn*


(or I just misunderstand binding/^:dynamic)


(the generated code in js seems to be the same as well)


oh, I see it now, there's a warning, but it compiles fine.


@kurt-o-sys it does do something, it signals the compiler that the var should never be directly invoked as it could be rebound at runtime and perhaps something will be different then.


right... the warning, right? Get it, but it's intended that it compiles fine?


well as long as you understand how it could go wrong


but yes, it won’t fail compilation


ok... just to know (and to be sure I get it right). OK, thx a lot!