This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-14
Channels
- # beginners (183)
- # boot (6)
- # cider (106)
- # cljs-dev (17)
- # cljsjs (2)
- # cljsrn (2)
- # clojure (56)
- # clojure-italy (14)
- # clojure-nl (39)
- # clojure-spec (49)
- # clojure-uk (138)
- # clojurescript (197)
- # core-logic (37)
- # cursive (22)
- # datascript (5)
- # datomic (29)
- # devcards (18)
- # emacs (1)
- # events (8)
- # figwheel (1)
- # fulcro (59)
- # lein-figwheel (1)
- # leiningen (1)
- # off-topic (54)
- # onyx (3)
- # pedestal (1)
- # portkey (4)
- # re-frame (18)
- # reagent (5)
- # reitit (43)
- # ring (6)
- # ring-swagger (26)
- # shadow-cljs (42)
- # spacemacs (8)
- # specter (12)
- # sql (3)
- # tools-deps (21)
- # vim (18)
I have a problem with :azure-app
while compiling with :simple
> var x = require("./query-events")
TypeError: $s$$.substring is not a function
at Function.cljs.core.subs.cljs$core$IFn$_invoke$arity$2 (/home/arichiardi/git/laputa/lambda-cqrs/cljs/shared.js:9564:15)
@thheller is it possible for shadow-cljs to :closure
js provider for one npm package, but :shadow
everywhere else?
@levitanong no, always all or nothing
I'm working on migrating a large app over to shadow, playing whack-a-mole migrating existing cljsjs dependencies to their npm equivalents. I've hit up against an issue with clipboard
, which causes shadow to throw:
> failed to resolve: ./clipboard-action from [redacted]/node_modules/clipboard/dist/clipboard.js
> {:relative-to #object[java.io.File 0x624eb05d "[redacted]/node_modules/clipboard/dist/clipboard.js"], :entry "./clipboard-action"}
> ExceptionInfo: failed to resolve: ./clipboard-action from [redacted]/node_modules/clipboard/dist/clipboard.js
Here's the offending line: https://github.com/zenorocha/clipboard.js/blob/master/dist/clipboard.js#L506
I'm not a front-end specialist, but the above looks fishy to me: the /dist
directory doesn't contain clipboard-action.js
, only /src
does. But the /src
dir isn't packaged into the module. Does this imply a bug in clipboard
s packaging: making relative reference to a file which doesn't exist?
@henrygarner which version is that? https://unpkg.com/[email protected]/dist/clipboard.js doesn't seem to have that?
it is scary how bad some packages are built and webpack allowing it instead of complaining 😞
@henrygarner "clipboard/dist/clipboard.min.js"
instead of just "clipboard"
seems to work
it occurs to me that people don’t actually program in any version of ecmascript anymore. they program in webpack.
@thheller your solution with munging is not working on my side
because the umd
helper exports the names unmunged
so either the umd
starts munging or we use my fix with the array, or if you have any other approach I can work on it
I also pushed a PR with another fix for the dirs
yeah me too, but maybe it is going to cause massive breakage
people using :node-library
probably already use :exports {:someVar some.ns/some-var}
or :exports {:some_var some.ns/some-var}
so its probably ok
yeah that is true
cool lemme try 😄
thanks for the quick fix
any advice on debugging “Timeout while waiting for REPL result.” while trying to require an internal namespace?
@nickmbailey see if the browser console shows an error
aha thanks
didn’t think to look there
@thheller I noticed that if my code triggers an error on reload (runtime), the shadow HUD stays on screen forever
I'm in the latest shadow, so I think it still there
thanks
wonder what the behaviour should be. given that the before-load fns were already called
I would expect it give some feedback and tell that some problem occurred during code load, and I think don't call after-load, like if it was a compilation warning
I have :http-port 3000
in my shadow config but when running shadow-cljs watch app
it prints shadow-cljs - HTTP server for :app available at
. Why does this happen? It appears the content is available at ports 3000 and 3001.