This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-24
Channels
- # beginners (61)
- # boot (1)
- # cider (55)
- # cljs-dev (17)
- # cljsrn (1)
- # clojure (31)
- # clojure-india (5)
- # clojure-spec (9)
- # clojure-uk (42)
- # cursive (3)
- # datomic (29)
- # editors (3)
- # fulcro (23)
- # hoplon (2)
- # lumo (12)
- # off-topic (8)
- # pedestal (6)
- # re-frame (3)
- # reagent (8)
- # reitit (23)
- # shadow-cljs (82)
- # specter (14)
- # tools-deps (8)
If I add ["firebase/firebase-firestore" :as db], I get the following error. failed to load module$node_modules$firebase$firebase_firestore
@smnplk https://github.com/jacekschae/shadow-firebase/blob/master/src/app/fb/init.cljs might help
@thheller nope, I get "could not find module-entry: firebase/app." I am using firebase version 5 npm package, but you are using ver 4.
@thheller Yeah I know, but I am trying to use es6 module packaging thingie, where you can require only what you need.
yes, but demo above is using firebase ver 4. If I use the import from demo in my code, which uses firebase ver 5 package, it doesnt compile
@smnplk I get Uncaught ReferenceError: firebase is not defined
when trying to load firebase/firebase-firestore
so it seems like you are not meant to use those files directly when using a build tool
I'm having an issue with releasing, in my chrome-ext with which I develop locally it works but when using shadow-cljs release dev
it doesn't anymore. One of the node_modules deps is an empty object when importing.
https://github.com/bbss/cljsc2/blob/master/shadow-cljs.edn Nope, don't have it on.
It might be possible to do that without a chrome extension.. I'm not sure :thinking_face: .
I don't think the issue I'm having now is related to the chrome-ext. Sorry for the misdirection.
Yeah.. It's a bit of a mess, in the process of cleaning it up right now. But still a lot of imports that aren't needed.
the shadow-cljs watch dev
seems to work. but with externs on I do get some warnings:
Cannot infer target type in expression (. (gdom/getElement "notebook-container") prepend el)
thats fine but you are using :optimizations :simple
anyways so its probably not externs
nope. TypeError: module$node_modules$$firebase$app$dist$index_cjs.initializeApp is not a function
the above type error is if I use :as , If I use :default, I get "BUILD-WARNING in app/firebase.cljs at [13:2] No such namespace: firebase, could not locate firebase.cljs, firebase.cljc, or JavaScript source providing "firebase""
I asked because it complained about undeclared Var before, I had to restat shadow, now it looks like it's working fine. Thank you kind sir 🙂
This line is erroring: https://github.com/bbss/cljsc2/blob/master/src/cljsc2/cljs/parinfer_wrap.cljs#L18
is there something wrong with my import syntax maybe? I tried making the first parinfer-codemirror
a string. But that didn't change it.
hmmm, I'll try. but if I js/console.log
parinfer-codemirror it seems to be an empty object, so init is not defined.
maybe something wrong with the module syntax? https://github.com/shaunlebron/parinfer-codemirror/blob/master/parinfer-codemirror.js
check if node_modules/parinfer-codemirror/parinfer-codemirror.js
is the actual file you want?
Yes, it is the one I want. In my chrome-ext it does work. Interestingly in that file codemirror is defined, but the parinfer and parinfer-codemirror are both empty objects. Both are from the same author so could it be the exporting syntax is the culprit?
Okay, I'll dig deeper. I am loading it into a jupyter notebook, and it might be somehow the module systems are clashing
However the codemirror import does have the version from npm, and the one used by jupyter notebook is a different version.
ah ok. https://github.com/shaunlebron/parinfer-codemirror/blob/master/parinfer-codemirror.js#L14
@bbss you can also use :entries [..] :prepend "window.define = undefined;"
in your :modules
config
maybe even :prepend "window.defineOriginal = window.define; window.define = undefined;" :append "window.define = window.defineOriginal;"
I could probably add a fix for this so the define
branch is never taken in amd wrapped files