This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-07
Channels
- # 100-days-of-code (13)
- # beginners (12)
- # business (6)
- # cider (6)
- # cljdoc (9)
- # cljs-dev (1)
- # cljsrn (4)
- # clojars (4)
- # clojure (31)
- # clojure-dev (12)
- # clojure-uk (11)
- # clojurescript (16)
- # cursive (1)
- # datascript (4)
- # datomic (10)
- # editors (1)
- # figwheel-main (3)
- # graphql (10)
- # lein-figwheel (29)
- # off-topic (1)
- # pedestal (1)
- # re-frame (31)
- # reitit (3)
- # shadow-cljs (27)
- # slack-help (5)
- # spacemacs (1)
- # yada (5)
I’m using shadow to deploy a production build that includes the library, re-frame-firebase. https://github.com/deg/re-frame-firebase. If I run with :optimizations :simple or :advanced, I get the following error.
------ WARNING #1 --------------------------------------------------------------
File: firebase/app.cljs:1:14
constant firebase assigned a value more than once.
Original definition at externs.shadow.js:6
--------------------------------------------------------------------------------
If I run with :optimizations :whitespace, I do not get any compile errors but the browser is not happy and I get main.js:3157 Uncaught TypeError: Cannot set property 'Error' of undefined
at main.js:3157
at main.js:15494 Uncaught TypeError: Cannot read property 'main' of undefined
at window.onload ((index):14)
goog.nodeGlobalRequire=function(path){return false};goog.provide("goog.debug.Error")
Any ideas on what is going on and how to resolve? TNX@kanwei no idea but the log you posted clearly shows that you have some dependency conflicts which may cause issues
Hitting some weird issue with an undeclared warning, not sure if it's the cljs compiler or something in shadow-cljs.
(go-loop []
(let [[[request-spec preload started] result] (<! finished-requests)
request-took-ms (- (.getTime (js/Date.))
(.getTime started))
latest-ten (cons request-took-ms (take 9 @avg-processing-time-coll))
avg-processing-time (/ (reduce + latest-ten) (count latest-ten))]
(when (not preload)
(do (aset result "took" (+ avg-processing-time 100))
(js/postMessage result #js [result])))
(recur)))
163 | (js/postMessage #js {:result result} (to-array [(aget result "data")]))))
----------------------------------------------^---------------------------------
Use of undeclared Var gsv.worker/result
Tried (js/postMessage (clj->js {:result result}) (to-array [(aget result "data")]))
that works.
@bbss I can reproduce this easily ... will see if its shadow-cljs or upstream
(go (let [a 1]
(prn a)
(prn #js [a])
(prn #js {:a a})))
@kanwei maybe you are running into this https://dev.clojure.org/jira/browse/CLJ-2414. hard to tell since it seems to be working fine for me