oliyh / re-graph

A graphql client for clojurescript and clojure
460 stars 39 forks source link

Re-graph logger causes: "TypeError: Cannot read properties of undefined (reading 'Level')" #84

Closed RyanD closed 2 years ago

RyanD commented 2 years ago

I think this is related to newest clojure release changing some previously included libraries into requiring an import.. but not 100% sure. see: https://clojurescript.org/news/2021-11-04-release

The code that seems to be causing this:

#?(:cljs
   (def levels {:severe goog.debug.Logger.Level.SEVERE
                :warning goog.debug.Logger.Level.WARNING
                :info goog.debug.Logger.Level.INFO
                :config goog.debug.Logger.Level.CONFIG
                :fine goog.debug.Logger.Level.FINE
                :finer goog.debug.Logger.Level.FINER
                :finest goog.debug.Logger.Level.FINEST}))

If I figure it out I'll attempt a pull request.

oliyh commented 2 years ago

Hi,

Thanks for reporting this, I haven't tried the newest one yet. This Logger broke before as well with newer cljs versions!

oliyh commented 2 years ago

Hi,

The code no longer looks like this, I think you were using an old version of re-graph. Are you able to try with the latest version?

Thanks

RyanD commented 2 years ago

Tried it just now and the message is gone thanks!

oliyh commented 2 years ago

Great :)