This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-17
Channels
- # adventofcode (56)
- # announcements (1)
- # aws (6)
- # beginners (127)
- # bristol-clojurians (1)
- # calva (29)
- # cider (7)
- # clj-kondo (37)
- # cljdoc (20)
- # cljsrn (7)
- # clojure (159)
- # clojure-europe (67)
- # clojure-italy (23)
- # clojure-nl (4)
- # clojure-provo (3)
- # clojure-uk (18)
- # clojurescript (19)
- # code-reviews (59)
- # community-development (105)
- # conjure (6)
- # core-async (16)
- # core-logic (1)
- # cursive (21)
- # datomic (19)
- # defnpodcast (1)
- # emacs (8)
- # events (2)
- # fulcro (71)
- # graalvm (23)
- # jobs-discuss (1)
- # kaocha (5)
- # luminus (5)
- # meander (16)
- # nrepl (32)
- # off-topic (6)
- # pathom (159)
- # pedestal (3)
- # reagent (14)
- # reitit (8)
- # reveal (12)
- # rewrite-clj (9)
- # shadow-cljs (169)
- # spacemacs (16)
- # specter (2)
- # sql (19)
- # tools-deps (36)
- # vim (6)
Hey guys. I have setup a shadow-cljs project with deps.edn. When I run the
clj -A:shadow-cljs-dev watch app
command I get a server up and running and things are great. But after I quit it with "ctrl + z" the server lingers forever. I can go to localhost:8700 and still see my app running there. If I restart the watch app then it will says that my build is stale and was not produced by the current watcher. Only workaround is to change the port.
Anyone know how to fix this? Reboot doesn't help either. So something is cached somewhere?I did "Ctrl + C" in the beginning and it had the same effect. So I checked the shadow-cljs documentation and I believe there they mentioned ctrl+z. Either way both have the same outcome :/
Shadow-cljs does not mention "Ctrl+Z".
"Ctrl+Z", if you use it in some common terminal without redefining any keys, sends SIGTSTP
that suspends the foreground process - it doesn't stop it. In fact, you can bring it back with the fg
command (assuming bash
-like shell).
"Ctrl+C" should work with the shadow-cljs
executable or with npx shadow-cljs
or something like that.
Why it doesn't work for you depends on what your :shadow-cljs-dev
alias does.
Hmmm.. I must have confused myself then. >< The alias is this:
:shadow-cljs-dev
{:extra-deps {thheller/shadow-cljs {:mvn/version "RELEASE"}
re-frame/re-frame {:mvn/version "1.1.2"}
binaryage/devtools {:mvn/version "1.0.2"}
re-frisk/re-frisk {:mvn/version "1.3.5" :exclusions [com.google.code.findbugs/jsr305
re-frame/re-frame]}}
:main-opts ["-m" "shadow.cljs.devtools.cli"]}
Oh I didnt know about that channel. Thanks! š
Hi ! I wonder to know what's the solution to import ES6 default export in vanilla CLJS since this issue? https://clojure.atlassian.net/browse/CLJS-2376
@U066TMAKS FYI, I had sucess with experimentation using Shadow-CLJS since it provides :default
to import the lib like this
["react-native-alarm-clock" :default AlarmClock]
For the moment, no success with vanilla CLJS using Krell.
I think we have to take out our jocker and call for help from @U050B88UR @U04VDQDDY š
With Krell I tried to import like this but no success
["react-native-alarm-clock" :refer [default] :rename {default AlarmClock}]
@U050B88UR @U04VDQDDY @U066TMAKS You can ignore my latest posts, it works! I don't know why my tests didn't work but this time it was done in the classic way:
["react-native-alarm-clock" :as clock]
...
(.-default clock)
So @U066TMAKS The full code you can tried:
(ns awesome-project.core
(:require [reagent.core :as r]
[reagent.react-native :as rn]
["react-native-alarm-clock" :as clock]))
(defn create []
(let [date (js/Date.)]
(.createAlarm (.-default clock) (.toISOString date) "My alarm")))
(defn hello []
[rn/view {:style {:flex 1 :align-items "center" :justify-content "center"}}
[rn/text {:style {:font-size 50}} "Hello Krell!"]
[rn/button {:on-press #(create)
:title "Add alarm"}]])
(defn ^:export -main [& args]
(r/as-element [hello]))
The doc from the ib doesn't mention this, but don't forget to add the alarm permission.
Add this line in your ./android/app/src/main/AndroidManifest.xml
:
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
thanks so much for following up Michaƫl! your answers have been really helpful for me getting up and running with cljs + rn.
everything worked after adapting your code example and adding the permission to the manifest.

I do regullary with Shadow-CLJS since it provide :default
in ns but vanilla CLJS doesn't adopt it.
https://clojure.atlassian.net/browse/CLJS-2376