This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-04
Channels
- # aws (1)
- # beginners (163)
- # boot (1)
- # bristol-clojurians (1)
- # cider (7)
- # clara (1)
- # cljs-dev (22)
- # cljsjs (1)
- # clojure (43)
- # clojure-denver (1)
- # clojure-finland (6)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-russia (1)
- # clojure-spec (1)
- # clojure-uk (6)
- # clojurescript (107)
- # cursive (4)
- # data-science (2)
- # datascript (2)
- # datomic (19)
- # duct (31)
- # emacs (1)
- # fulcro (50)
- # graphql (15)
- # hoplon (3)
- # lein-figwheel (2)
- # luminus (21)
- # off-topic (74)
- # onyx (3)
- # parinfer (15)
- # portkey (2)
- # precept (9)
- # proton (1)
- # re-frame (130)
- # reagent (73)
- # reitit (7)
- # ring-swagger (5)
- # shadow-cljs (61)
- # spacemacs (18)
- # specter (12)
- # uncomplicate (1)
- # vim (88)
- # yada (2)
I'm trying to transition a re-frame/soda-ash (ie. semantic-ui) project to shadow in preparation for trying to do an Electron packaging, and I've hit a bit of an npm head-scratcher:
soda-ash is using cljsjs/semantic-ui-react ... I've followed the cljsjs transitioning steps to replace it with my own little namespace that pulls in the NPM, but the compiler isn't happy that ReactDOM seems to be missing. It's in package.json
but the compiler doesn't seem to be picking it up.
@rgm the semantic-ui-react/dist/umd
is not a valid package unfortunately. commonjs should be fine. could even try the es
version
thanks, yeah... was just trying to mirror what cljsjs.semantic-ui-react pulled down from unpkg (which soda-ash relies on) so I have no idea how lein cljsbuild is making that work. ¯\(ツ)/¯
guess it must just be foreign and tacked onto the front of the bundle in just the right place
CLJSJS just includes things as they are and does not do any further processing. so it relies on the ReactDOM and React globals being available
so if you any other package also used lodash you'd include it twice. by using the commonjs directly its only included once
thinking downstream towards possible advanced compilation, is there an advantage to using the ES6 versus commonjs versions?
even better would be only requiring what you need but that seems a bit ugly for this package
using the index always pulls in everything which is a bit annoying if you only use 10% or their stuff
I'm still shaking off a few years with meteor.js waiting 30-40s every single time the file watcher fired up, so I'm cool with 18s one time.
@rgm @thheller if anyone is willing, would be happy to accept PR to add how to use soda-ash with shadow-cljs to soda-ash's README
we can add the cljsjs.semantic-ui-react
to https://github.com/thheller/shadow-cljsjs so others don't have to do this part
(also I haven't yet got my project back up on its feet so maybe I should wait until I've sorted that out ... don't think there's still a problem with SA since it all looks good but just want to actually see pixels on the screen).
holy dinah ... my project is working again, and so (I think) is advanced compilation for the first time ever

@gadfly361 lmk, but I'm not sure that soda-ash in particular needs anything more than https://github.com/thheller/shadow-cljsjs/pull/5 to exist... seems more of a shadow-specific concern that https://shadow-cljs.github.io/docs/UsersGuide.html#cljsjs documents well.
@rgm sounds good to me! I am unfamiliar with shadow-cljs, so will leave it to you guys :) (Hope to take it for a test ride soon tho!)
Hi! I have been getting this error and I’ve no idea where it comes from:
NullPointerException:
clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:301)
shadow.build.output/flush-dev-js-modules (output.clj:564)
shadow.build.output/flush-dev-js-modules (output.clj:560)
shadow.build.targets.npm-module/process (npm_module.clj:63)
shadow.build.targets.npm-module/process (npm_module.clj:54)
clojure.lang.Var.invoke (Var.java:381)
shadow.build/process-stage/fn--14988 (build.clj:119)
shadow.build/process-stage (build.clj:116)
@thheller I just started with shadow so sorry if I am doing something silly. I installed it tonight so I assume latest version, and my build config is:
:builds
{:npm {:target :npm-module}}
or add :output-dir "out"
or so. it defaults to :output-dir "node_modules/shadow-cljs"
:target :npm-module
requires at least :output-dir
, which is set if using the built-in :npm
config
Ah well, quick fix 🙂 Beyond that I am excited about shadow; I am working on a ClojureScript project which I would like to use as a library in a webpack project
Oh also, while I am at it: when running the watch
command I get a bunch of warnings @thheller :
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/Users/hmaurer/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.KQueueSelectorProvider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
yeah those are Java9 warnings. can't really do anything about them until that lib gets updated.
oh also, is it normal that arrow keys don’t work in the clj-repl ? Am I required to use rlwrap?
I never use the REPL from the command line. always from my editor (Cursive) so I really have no idea what people want for the command line
Ok, thank you! I should probably get used to an editor with good clojure repl integration