This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-03
Channels
- # aleph (3)
- # beginners (139)
- # boot (3)
- # cider (12)
- # cljs-dev (18)
- # clojure (100)
- # clojure-dev (21)
- # clojure-dusseldorf (5)
- # clojure-germany (1)
- # clojure-italy (35)
- # clojure-nl (26)
- # clojure-spec (4)
- # clojure-uk (60)
- # clojurescript (11)
- # clojutre (4)
- # cursive (21)
- # data-science (21)
- # datomic (47)
- # editors (3)
- # emacs (2)
- # events (4)
- # figwheel (2)
- # fulcro (28)
- # jobs (27)
- # jobs-discuss (21)
- # lein-figwheel (3)
- # midje (2)
- # off-topic (20)
- # om-next (4)
- # onyx (10)
- # overtone (1)
- # pedestal (2)
- # portkey (14)
- # re-frame (71)
- # reagent (44)
- # reitit (11)
- # remote-jobs (1)
- # ring-swagger (4)
- # shadow-cljs (64)
- # spacemacs (11)
- # testing (2)
- # tools-deps (8)
- # vim (8)
@urbanslug I had to create a new image in the end. itβs here https://hub.docker.com/r/steveb8n/cljs-node-aws-cli/
where does :ssl {}
go in my config?
I'm trying to satisfy all the lighthouse audits locally
oh nvm I have to do the self signed stuff all g
is it normal that if i run shadow-cljs watch npm
in one tab
and shadow-cljs node-repl npm
in another
that i have to quit the repl and restart it to see code changes?
and that when i restart i don't have any repl history saved?
@thedavidmeister node-repl
is completely standalone and does not take a build argument. you probably want shadow-cljs cljs-repl npm
. if you want REPL history and stuff use rlwrap shadow-cljs cljs-repl npm
. didn't have time to add that yet.
let me try that...
so i see this now
No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.
with the rlwrap command
that message has been tuned like 100 times. I do not know how to make it any clearer.
ok, what target would let me test things out more easily?
hitting an API from cljs
from a repl, with code reloading as i make changes
the node-repl
doesn't do live reload since thats not usually how you work with a REPL
i did try browser, but code reload did not work and it wouldn't let me make network calls
what do you mean live reload isn't usually how i work with REPL?
oh, the boot one has an option to
its left to tools like tools.namespace
or manually calling (require 'foo.bar :reload)
or load-file
so i'm used to that in clj
kk, i'll try that out
ah ok this is working, thanks!
i'll try to port it to what i was doing and see where i went wrong
somewhat related question
is there a way to only require something from npm when i'm not running it in a browser?
oooooh
Hiya, I'm getting this intermittent failure when running my karma tests after a shadow-cljs watch ci
. The karma error is a bit obscure, but I can trace it down to this line: https://github.com/thheller/shadow-cljs/blob/5df9969639030128586afd2968db2ea5f704b4b0/src/main/shadow/test/karma.cljs#L17
Error message:
{
"message": "Uncaught TypeError: s.replace is not a function\nat ci.js:138901:1\n\nTypeError: s.replace is not a function\n at Object.clojure$string$replace_all [as replace_all] (ci.js:53046:10)\n at Object.clojure$string$replace [as replace] (ci.js:53105:23)\n at Object.shadow$test$karma$indent [as indent] (ci.js:358372:23)\n at shadow$test$karma$format_log (ci.js:358467:304)\n at ci.js:32847:89\n at cljs.core.map.cljs$core$IFn$_invoke$arity$2 (ci.js:32848:3)\n at cljs.core.LazySeq.sval (ci.js:26691:109)\n at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (ci.js:26842:10)\n at Object.cljs$core$seq [as seq] (ci.js:19645:13)\n at cljs.core.map.cljs$core$IFn$_invoke$arity$2 (ci.js:32821:36)",
"str": "Uncaught TypeError: s.replace is not a function\nat ci.js:138901:1\n\nTypeError: s.replace is not a function\n at Object.clojure$string$replace_all [as replace_all] (ci.js:53046:10)\n at Object.clojure$string$replace [as replace] (ci.js:53105:23)\n at Object.shadow$test$karma$indent [as indent] (ci.js:358372:23)\n at shadow$test$karma$format_log (ci.js:358467:304)\n at ci.js:32847:89\n at cljs.core.map.cljs$core$IFn$_invoke$arity$2 (ci.js:32848:3)\n at cljs.core.LazySeq.sval (ci.js:26691:109)\n at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (ci.js:26842:10)\n at Object.cljs$core$seq [as seq] (ci.js:19645:13)\n at cljs.core.map.cljs$core$IFn$_invoke$arity$2 (ci.js:32821:36)"
}
That namespace is requiring clojure.string but isn't using the alias s
. I'd be surprised if that was the problem though!
So the problem is a non-string message in the is
, which is invoked when the test fails. Is the correct fix to just call str
on a s
? https://github.com/thheller/shadow-cljs/blob/5df9969639030128586afd2968db2ea5f704b4b0/src/main/shadow/test/karma.cljs#L15
is there some incantation I can do to get a node_module that exports only a .jsx file to work?