Fork me on GitHub
#reagent
<
2017-12-27
>
mikerod16:12:55

@felipehummel Not sure I have advice, but ar you also using :npm-deps options in lein and also using react-helmet?

felipehummel16:12:18

lein: yes. react-helmet: no

felipehummel16:12:28

but it's also a react lib/component

mikerod16:12:33

lein + :npm-deps you mean yes to ?

felipehummel16:12:50

Yes, I'm :npm-deps with lein

felipehummel16:12:05

In my case it's react-currency-masked-input lib/component I'm importing through npm-deps

felipehummel16:12:25

A small difference is that I'm importing it with [react-currency-masked-input :as CurrencyInput]

felipehummel16:12:42

the component inside react-currency-masked-input is exported as default

mikerod16:12:53

In that stackoverflow I noticed they used aget to get the “default”. The correct way to access fields via string is goog.object/get. However, I don’t think that breaks on any cljs versions that I’ve seen (could be wrong).

mikerod16:12:07

You also may not be literally doing the same thing as in the example from SO

felipehummel16:12:49

Yeah, that is my feeling. What caught my attention is that my problem also only occurs with optimizations=advanced

mikerod16:12:08

Yeah, that does make it odd

mikerod16:12:24

I wonder if it is something to do how the :npm-deps are being processed here

mikerod16:12:45

That is a fairly young feature of cljs. I haven’t seen this sort of error before, but haven’t made extensive use of :npm-deps

mikerod16:12:07

I was just trying to see if I could see anything that may cause this

mikerod16:12:18

are you using a new cljs version as well?

felipehummel16:12:17

[org.clojure/clojure "1.9.0-beta3"]
                 [org.clojure/clojurescript "1.9.946"]
                 [org.clojure/core.async "0.3.443"]
[reagent "0.7.0"]
                 [re-frame "0.10.1"]

mikerod16:12:21

I haven’t been able to find anything still on it. Did you get more of a stacktrace to follow than just: “Uncaught TypeError: Cannot call a class as a function” There is a chance that may shed some light

felipehummel16:12:02

Not really. Don't know of any knob that I can turn to make it spill a stacktrace or something else

mikerod16:12:46

If it happens with a cljs repl connected, you may be able to print *e and see something. However, I’m not sure

mikerod16:12:08

It’d be good to know a few more details to see if there is anything that stands out to me