This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-20
Channels
- # architecture (25)
- # beginners (68)
- # cider (10)
- # clara (3)
- # cljs-dev (90)
- # cljsrn (16)
- # clojure (132)
- # clojure-austin (7)
- # clojure-berlin (3)
- # clojure-czech (1)
- # clojure-dusseldorf (1)
- # clojure-greece (5)
- # clojure-italy (39)
- # clojure-spec (5)
- # clojure-uk (78)
- # clojured (2)
- # clojurescript (92)
- # community-development (6)
- # cursive (7)
- # data-science (1)
- # datascript (14)
- # datomic (32)
- # duct (8)
- # emacs (5)
- # figwheel (3)
- # fulcro (47)
- # hoplon (12)
- # jobs (10)
- # luminus (16)
- # lumo (5)
- # off-topic (1)
- # onyx (2)
- # parinfer (47)
- # pedestal (6)
- # re-frame (10)
- # reagent (2)
- # reitit (61)
- # ring (8)
- # ring-swagger (16)
- # shadow-cljs (116)
- # sql (17)
- # utah-clojurians (2)
- # vim (1)
@thheller hello, about the RN integration, would you have an idea why it only works if I compile to the node_modules/shadow-cljs
directory? when I try compiling on anything else (still inside node_modules
) it fails and dont run
@thheller not sure if you saw that, but it seems that shadow stops working if you delete some file that it did compiled before
it's happening to me compiling npm-modules
(for react native)
when I delete a file it's starting throwing errors
@wilkerlucio I ship a default .babelrc
for shadow-cljs
which tells babel to not do any processing
@wilkerlucio I believe I had that too yesterday. I dad yarn remove
on a package. All I had to do was to restart shadow-cljs.
there seems to be an issue with deleting files. the watch doesn't seem to detect it.
@hlolli yes, restarting fix it
Playing around with using shadow-cljs in a bigger, existing project and getting this:
The required JS dependency "react" is not available, it was required by "cljsjs/react.cljs".
@martinklepsch I think you need to install using npm install react react-dom create-react-class
. Shadow doesn't use the included js from cljsjs.
@martinklepsch https://shadow-cljs.github.io/docs/UsersGuide.html#_migrating_cljsjs
Got it. Wasn’t aware foreign-libs aren’t supported at all. Will need to see if that’s an issue.
@martinklepsch since you can just use JS directly now there shouldn't be any need to use foreign-libs ever
does anyone have a suggestion how to improve the > The required JS dependency "react" is not available, it was required by "cljsjs/react.cljs". error message?
You could just add “Install it using npm or yarn.” when I switched over to this project I couldn’t believe it was so easy after being burned by bizarre and unhelpful error messages coming from :npm-deps. 🙂
I don't know what to write that would it more obvious about what you are supposed to do
@thheller Insert a short link that points to the appropriate docs?
Is there a workaround for the case that I depend on a library which has something like this: https://github.com/funcool/cuerdas/blob/master/src/cuerdas/regexp.cljc#L33 ?
https://github.com/thheller/shadow-cljsjs/blob/master/src/main/cuerdas/vendor/xregexp.cljs
the shadow-cljsjs
lib maps the foreign-libs back to their original npm packages and uses those directly
you can just create them in your project in case they are not available in shadow-cljsjs yet
Interesting, got it
Ok, next issue: 😄 (I’m on cljs 1.9.946)
646 | #?(:cljs NaN :clj Double/NaN))))
----------------------^---------------------------------------------------------
Use of undeclared Var cuerdas.core/NaN
old cuerdas version? https://github.com/funcool/cuerdas/blob/master/src/cuerdas/core.cljc#L646
That’s probably it. Guess I could have seen that myself 🙈
hehe. those warnings easily get lost in other CLJS tools since it will only warn once when caching is enabled.
I’m always under the impression that Figwheel doesn’t print any warnings/errors to the console 😏
You could just add “Install it using npm or yarn.” when I switched over to this project I couldn’t believe it was so easy after being burned by bizarre and unhelpful error messages coming from :npm-deps. 🙂
and actually it might be worth the reminder for new people since npm-deps ostensibly installs the packages for you
Hi i’m trying to get my lein project (gen’ed by luminus) converted to shadow here’s my lein dev config, not sure which other options need to be moved over. Also, trying to figure out how to map my dev,test, uberjar profiles over appropriately
:cljsbuild
{:builds
{:app
{:source-paths ["src/cljs" "src/cljc" "env/dev/cljs"]
:figwheel {:on-jsload "fema-gmm.core/mount-components"}
:compiler
{:main "fema-gmm.app"
:asset-path "/js/out"
:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/cljsbuild/public/js/out"
:source-map true
:optimizations :none
:pretty-print true
;:install-deps true
;:npm-deps {:aws-amplify "0.2.6"
; :left-pad "1.1.3"}
:preloads [re-frisk.preload]}}}}
and what I have so far in my config file
;; shadow-cljs configuration
{:lein true
;:source-paths
;["src"]
;
;:dependencies
;[]
:builds
{:app {:target :browser
:output-dir "target/cljsbuild/public/js"
:asset-path "/js/out"
:modules {:main {:entries [fema-gmm.app]}}}}}
{:lein true
:builds
{:app {:target :browser
:output-dir "target/cljsbuild/public/js"
:asset-path "/js"
:modules {:main {:entries [fema-gmm.app]}}
:devtools {:after-load fema-gmm.core/mount-components
:preloads [re-frisk.preload]}}}}
lol yeah, it was my onramp into clojure back in the day so have just kind of stuck with it, never got much into lein hacking as it generally just worked
FYI, the lein section in the docs doesn’t appear to mention adding the [thheller/shadow-cljs "2.1.21"]
dependency
thats one of the most complex project.clj
I have seen. scary that the template generates this mess.
i’d kind of thought that, the project.clj was nutty, I’ve spent a lot of my life lol, becoming proficient at maven, gradle,sbt, etc
right, at the moment, my app bundles the cljs and the lightweight server into the uberjar
https://github.com/bhauman/lein-figwheel/blob/master/support/src/figwheel/client/utils.cljs#L8
@eoliphant do you use the REPL to interact with figwheel?
@eoliphant this is a rough rewrite of the template output https://github.com/thheller/lumifoo