Fork me on GitHub
#shadow-cljs
<
2020-10-16
>
sova-soars-the-sora18:10:58

Hey all, I keep getting this funky warning:

------ WARNING #1 -  -----------------------------------------------------------
 Resource: com/cognitect/transit.js:649:8
 variable module is undeclared

sova-soars-the-sora18:10:38

And in the console, for the minified release version there is:

winjpc.js:145 TypeError: Cannot read property 'call' of undefined
    at pa (winjpc.js:262)

sova-soars-the-sora18:10:01

I have ajax and rum as dependencies, the watch build works locally, but when I upload a release to my box it is no worky...

sova-soars-the-sora18:10:59

is it problematic that my namespace is a single word with no dots?

sova-soars-the-sora18:10:52

DOH renamed the build didn't change the console line to compile w/ new name xD

sova-soars-the-sora18:10:01

so the non-minified code says "move data fetching to componentDidUpdate" ... it's a warning

sova-soars-the-sora18:10:10

and then when I make a release build... it just doesn't work

sova-soars-the-sora18:10:30

Yeah, not really sure... maybe you guys get these errrors sometimes?

Karol Wójcik19:10:08

That’s probably lack of externs

sova-soars-the-sora19:10:23

Thank you. Will look into it now.

sova-soars-the-sora19:10:38

I added :infer-externs :all to the shadowncljs edn ... no difference yet... hrm

sova-soars-the-sora19:10:24

oh it needs :compiler-options {:infer-externs :auto} let's se if that does the trick...

macrobartfast21:10:13

can someone point me in the direction of a current tutorial on how to use npm react components in a shadow-cljs/reagent project?

macrobartfast21:10:35

I found a couple on the googles but I am worried they may not be current.

macrobartfast21:10:34

I want to use https://codesandbox.io/s/react-piano-basic-demo-forked-q5xyj in a lein new reagent myapp +shadow-cljs generated project… I’m not sure I can do this in ClojureScript, actually.

sova-soars-the-sora21:10:53

i think rumnext can make rum components out of javascript, not 100% sure

macrobartfast21:10:21

but I’m truly floundering.

dpsutton21:10:11

https://github.com/dpsutton/asg-ignite-presentation is a repo with links to a presentation, a demo app built and deployed onto netlify, and the repo of the app. it uses npm deps and shadow-cljs

sova-soars-the-sora21:10:30

dpsutton with the clutch fix =]

🙂 6
3
sova-soars-the-sora23:10:06

when it doubt.. baby steps and comment out

sova-soars-the-sora23:10:15

When I add these lines, everything breaks

[:input.insit { :type "text"
		        :value rc
				:auto-focus :true
                :on-change (fn [e] 	(reset! email-input (.. e -target -value)))}]

sova-soars-the-sora23:10:31

i think :value is not necessary... hrm

sova-soars-the-sora23:10:06

🎵 "minutes change like seasons, i'm just talking to myself.."

sova-soars-the-sora23:10:04

WOW. that was the offending line xD

sova-soars-the-sora23:10:15

thanks for stickin' it out with me boiz

sova-soars-the-sora23:10:22

i know you're here in spirit 😄

😇 3