This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-30
Channels
- # arachne (23)
- # bangalore-clj (2)
- # beginners (64)
- # boot (20)
- # cider (3)
- # clara (11)
- # cljs-dev (29)
- # cljsrn (10)
- # clojure (143)
- # clojure-brasil (4)
- # clojure-dev (22)
- # clojure-dusseldorf (3)
- # clojure-italy (26)
- # clojure-sanfrancisco (13)
- # clojure-seattle-old (2)
- # clojure-spec (15)
- # clojure-uk (27)
- # clojured (1)
- # clojurescript (52)
- # core-async (13)
- # cursive (2)
- # datomic (106)
- # fulcro (45)
- # garden (1)
- # graphql (11)
- # hoplon (98)
- # jobs (11)
- # juxt (7)
- # keechma (2)
- # leiningen (36)
- # off-topic (39)
- # parinfer (13)
- # re-frame (34)
- # reagent (5)
- # ring (1)
- # rum (4)
- # shadow-cljs (83)
- # sql (1)
- # timbre (1)
- # unrepl (49)
- # vim (1)
- # yada (42)
super excited by this project but i’ve tried to boot up 3 of the examples in the example-repo and each gave me a different error
the browser example said that it couldn’t find references to the jquery and crypto modules, thoug i did a yarn install
for local-js i get: > Uncaught ReferenceError: module$node_modules$react$index is not defined
perhaps im doing something wrong or some of these examples are stale… really all i want to do is get an example app running that requires rum from clojars and react from NPM
it appears too me shadow-cljs is writing some of the logs to stderr. I marked stderr red in my tool. Some of them are red.
if you want to use clj-run some.ns/fn
which outputs to stdout
I wanted to be able to capture that without any log output
and something like "shadow-cljs - watching build :browser" will outputs to stderr as well?
well, stackoverflow again... https://stackoverflow.com/questions/19870331/why-use-stderr-when-printf-works-fine
> The general practice is to redirect all error messages to stderr and all regular output to stdout. said by StackOverflow 😄
found it interesting >_> https://www.jstorimer.com/blogs/workingwithcode/7766119-when-to-use-stderr-instead-of-stdout
@kenbier the browser example had a bug which I fixed. local-js should work just fine. I removed the yarn.lock
files from the examples since they locked in older version of shadow-cljs
. so everything should be using the most recent version now without me having to update it.
amazing project btw… lack of npm support has been my biggest pain with CLJS, and honestly something that should be more talked about!
@jiyinyiyong just read some of your blog posts too, good stuff 🙂
does shadow-cljs handle SIGINT and SIGTERM differently? turned in to https://github.com/thheller/shadow-cljs/issues/186
or anything to do on my side? https://github.com/mvc-works/termina/blob/master/server/src/server/manager.cljs
no idea. the node process fully controlls the java process so it should die when node dies
btw instead of (.exec cp command (clj->js {:cwd cwd}))
you can do (cp/exec command #js {:cwd cwd})
hmm maybe try https://stackoverflow.com/a/33367711
Error: kill ESRCH
at Object._errnoException (util.js:1003:13)
at process.kill (internal/process.js:173:18)
@thheller I've added shadow-cljs to my cljs docker images: https://hub.docker.com/r/theasp/clojurescript-nodejs/
https://hub.docker.com/r/thheller/cljs-dev/ can't find the Dockerfile 😛
built if for the CI tests I still need to create https://github.com/thheller/shadow-cljs/blob/master/.circleci/config.yml#L8
I have a macro that creates some locally scoped variables, but I’m getting a bunch of use of undeclared Var
warnings
My macro looks like this
And used like this
How might I get rid of the warnings?
@colindresj Can you show the warnings?
Here’s an example @theasp
------ WARNING #17 -------------------------------------------------------------
File: /Users/jorge/lunar/src/lunar/ui/catalog/views.cljs:119:69
Use of undeclared Var lunar.ui.catalog.views/c
--------------------------------------------------------------------------------
That c
would be the var from the for-indexed
snippet above
Yeah, if you look at the macro definition above, you’ll see that i
and c
are set within the argument vector of the mapping function for map-indexed
user=> (for-indexed [i c [{:card/id 1} {:card/id 2}]] [:li {:class "card" :key i} (:card/id c)])
([:li {:class "card", :key 0} 1] [:li {:class "card", :key 1} 2]
Yeah and works without warning in the cljs compiler too
Found the issue, was forgetting to expose the macro via the namespace
I’ve got all my macros in a macros.clj file, and forgot to create the matching macros.cljs file with the :require-macros
in the ns form
Thanks for the help @theasp