This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-18
Channels
- # aws (1)
- # aws-lambda (1)
- # beginners (48)
- # boot (15)
- # cider (3)
- # cljs-dev (4)
- # cljsrn (4)
- # clojure (241)
- # clojure-chicago (1)
- # clojure-dusseldorf (12)
- # clojure-greece (41)
- # clojure-italy (3)
- # clojure-russia (16)
- # clojure-spec (7)
- # clojure-uk (34)
- # clojurescript (88)
- # community-development (9)
- # cursive (8)
- # data-science (55)
- # datomic (40)
- # devops (1)
- # emacs (20)
- # fulcro (19)
- # graphql (3)
- # hoplon (46)
- # luminus (11)
- # lumo (4)
- # off-topic (27)
- # onyx (26)
- # other-languages (25)
- # pedestal (2)
- # powderkeg (6)
- # re-frame (11)
- # reagent (4)
- # ring-swagger (17)
- # rum (4)
- # shadow-cljs (103)
- # spacemacs (14)
- # specter (6)
- # unrepl (21)
- # yada (1)
I get this when I do a :simple or :advanced build, but would anyone have a guess? Cannot read property 'ReactCurrentOwner' of undefined
@iku000888 react v16? I think they removed that.
app.js:193482 Uncaught TypeError: Cannot read property 'ReactCurrentOwner' of undefined
at Object.r.116 (app.js:193482)
at o (app.js:193479)
at app.js:193479
at Object.r.59.110 (app.js:193481)
at o (app.js:193479)
at app.js:193479
at Object.r.30.10 (app.js:193480)
at o (app.js:193479)
at app.js:193479
at Object.r.46.1 (app.js:193481)
But its still weird to me because I get the error with :simple optimization(Thought that would survive the renaming???)
hmm true, that should work. do you generate a different bundle for dev/release? ie use a minified build in :simple but not :none?
Got a job with a project that was built with cljs compiler+figwheel up to now that needs to ship 😛
did you try the usual :pseudo-names
debug to see where the ReactCurrentOwner
is used?
yeah it looks like the issue is in the bundle. :simple
should not have property names like that
Could it be possible if
:foreign-libs [{:file "bundle.js"
:provides ["cljsjs.react" "cljsjs.react.dom"
"webpack.bundle"]}]
you could try to including the bundle in a separate <script>
tag and not telling the CLJS compiler about it
Now I identified that (react and react-dom) come from the bundle but react-dom-server is not
maybe a stupid question, but… I just released my first cljs library to clojars, and included it in another project I am working on. However, in this project, I get Could Not Analyze errors when requiring the re-dnd.events namespace for instance. Are there special things I have to take into account before deploying to clojars? This is the lib in question: https://github.com/Kah0ona/re-dnd
Is there a limitation on using cljs core/async <! >! macros inside another macro? I stumbled upon this problem and reproduced it in this repo: https://github.com/fbielejec/gotry The macro simply wraps a body in a go-try-catch block and it gives me:
Error: >! used not in (go ...) block
@fbielejec shouldn't that be :refer-macros [gotry]
(or (:require-macros ...)
)?
@moxaj accroding to this it should work https://dev.clojure.org/jira/browse/CLJS-1507
it's a cljs-only macro for the simplicity of the example. Actually should probably be stripped of the reader conditional alltogether
well initially the macro was written with both targets in mind, hence the conditional
if by targets you mean clojure/clojurescript, reader conditionals wouldn't really have helped you there (assuming you are using regular clojurescript), because for both targets the clojure reader would have read the file
Has anyone else seen a cljs.tools.reader not found error when using a cljs compiler later than 1.9.671?
@iku000888 Don't know the details, but this is what I did: https://github.com/binaryage/env-config/commit/9be8a9fb533dc2c82978f2dffe0186ade1feb769
Anyone using clojure.spec? Or are there better libraries that help with form errors and things?
prismatic/schema does portable data validation and it’s what my app uses since it’s a lot older than this new-fangled spec thing
struct does seem pretty nice. I've been using it a bit and I really like how it handles error strings; very easy to pop into a form.
I actually tried prismatic/schema out and found it really difficult to use, at least for form validation. I remember running into trouble with just simple (and () () ())
style predicates.
@noisesmith did you find a good way for schema to have good user-facing messages? That's where it always fell down for me, even the humanizer created things like "42 is not a java.lang.String"
@dominicm I pretty print the return value of s/check, which isn’t perfect but it usually helps me find the issue quickly
@noisesmith depends on what that message goes to I guess? 🙂
I’m just trying to update a few dependencies, but compilation blows up. Any ideas why I would get No reader function for tag Inf
one of the more recent cljs versions fixes this, it's needed if you update to the more recent clojure 1.9 builds
@hkjels could be a tools.reader issue https://groups.google.com/forum/#!topic/clojure/dSrlFNdfIFE