This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-31
Channels
- # announcements (3)
- # babashka (75)
- # beginners (16)
- # calva (124)
- # cider (10)
- # clara (2)
- # clj-kondo (1)
- # cljdoc (4)
- # cljs-dev (14)
- # clojure (104)
- # clojure-australia (4)
- # clojure-czech (5)
- # clojure-europe (14)
- # clojure-germany (48)
- # clojure-nl (4)
- # clojure-serbia (4)
- # clojure-uk (34)
- # clojurescript (60)
- # community-development (16)
- # conjure (12)
- # core-async (34)
- # cursive (42)
- # data-science (7)
- # deps-new (9)
- # depstar (1)
- # emacs (11)
- # events (2)
- # fulcro (15)
- # graalvm (1)
- # inf-clojure (1)
- # jobs (3)
- # jobs-discuss (1)
- # joker (7)
- # juxt (8)
- # lsp (20)
- # malli (42)
- # meander (4)
- # off-topic (5)
- # pathom (2)
- # polylith (13)
- # re-frame (39)
- # reagent (9)
- # reitit (31)
- # releases (2)
- # rewrite-clj (23)
- # shadow-cljs (39)
- # spacemacs (11)
- # specter (6)
- # tools-deps (8)
- # xtdb (12)
Hi,
my app works fine in dev and up until now worked fine in production.
Now I get:
FATAL [com.fulcrologic.fulcro.components:400] - Cannot find app on component!
when I swap out main.js
form the shadow-cljs dev build with main.js
from shadows-cljs release.
Does anyone have any tips where to look.
The app starts up fine but some event triggers this:
react_devtools_backend.js:2430 TypeError: Cannot read property 'cljs$core$IFn$_invoke$arity$1' of null
at net.markusgraf.hhh.ui.person_list.ListDeployment.component_did_mount [as componentDidMount] (main.js:8514)
at Nj (main.js:164)
at ak (main.js:197)
at m.unstable_runWithPriority (main.js:26)
at hd (main.js:92)
at md (main.js:190)
at Og (main.js:182)
at main.js:92
at m.unstable_runWithPriority (main.js:26)
at hd (main.js:92)
I deleted .shadow-cljs and resources/public/js/main to catch caching issues. Is there someplace else I should clean? I set optimizations to whitespace and cache-level to off. Both does not help.
Can you look at the props of the component on React dev tools? Is it possible it somehow lost the Fulcro props?! (Or try-catch and console.log this
)
Each Fulcro component has in its props a reference to the global app (look at how comp/any->app works) so research where is the chain broken
@U0522TWDA @thheller thank you!!! I caught it with git bisect. I had changed m/set-value! to m/set-value!! where I should not have. @U0CKQ19AQ Is there an FAQ or troubleshooting collection where I should note for posterity: If furlcro+shadow-cljs dev works and release does not: check your !!s ?
if you’re using !! in a strange async context, then the bug might be with your code, and perhaps it was working “by accident” in dev
I have an input that changes :ui/filter-string
and then I (map ui-something filtered-things)
.
One day I thought I could add the extra ! to make that faster. The commit literally adds one ! in two places. I think it is react methods that blow. So it could be react-dev vs react-prod related. Or a timing thing. But you are of course right my code propably worked by accident in dev.
Happy you solved this!
map
is lazy. Most of the DOM stuff forces children so that laziness doesn’t bite you, but it’s something to think about
@magra run shadow-cljs release app --debug
which should make it easier to pin down whats wrong
@thheller npx shadow-cljs release -A:ui prod --debug
shadow-cljs - config: /usr/home/markus/Code/cljc/hhh/shadow-cljs.edn
shadow-cljs - connected to server
NPM dependency "@js-joda/timezone" has installed version "2.5.0"
"2.2.0" was required by jar:file:/usr/home/markus/.m2/repository/tick/tick/0.4.30-alpha/tick-0.4.30-alpha.jar!/deps.cljs
NPM dependency "@js-joda/locale_en-us" has installed version "3.2.2"
"3.1.1" was required by jar:file:/usr/home/markus/.m2/repository/tick/tick/0.4.30-alpha/tick-0.4.30-alpha.jar!/deps.cljs
NPM dependency "react-grid-layout" has installed version "1.2.0"
"^0.16.6" was required by jar:file:/usr/home/markus/.m2/repository/com/github/awkay/workspaces/1.0.3/workspaces-1.0.3.jar!/deps.cljs
NPM dependency "highlight.js" has installed version "10.6.0"
"^9.12.0" was required by jar:file:/usr/home/markus/.m2/repository/com/github/awkay/workspaces/1.0.3/workspaces-1.0.3.jar!/deps.cljs
[:prod] Compiling ...
Using Wrapped inputs
[:prod] Build completed. (647 files, 190 compiled, 0 warnings, 19,62s)