Fork me on GitHub
#cljsrn
<
2021-08-11
>
danielstockton06:08:30

I'm trying to get a krell project running. Currently getting Caused by: clojure.lang.ExceptionInfo: ReferenceError: Can't find variable: cljs when running clj -M -m krell.main -co build.edn -c -r if anyone has experienced this?

danielstockton12:08:18

I did see that, but I'm not on windows (ubuntu).

dnolen17:08:19

@danielstockton that error means the something went wrong with the RN environment setup - did you try the exact steps defined in the Reagent tutorial?

danielstockton06:08:32

Yes, I followed the RN CLI quickstart and had it running successfully on my device with only RN. Following the krell steps, I encountered the npm resolve error and fell back to using yarn. I deleted everything and tried following the instructions again, with the same result. I also tried bumping reagent up to 1.1.0 in deps.edn, which allowed me to install the dependencies with npm - didn't expect this to work, and it failed with a different error (missing some react native device type modules).

danielstockton06:08:16

Looks like I'm not the only one having this problem: https://github.com/vouch-opensource/krell/issues/142

alexdavis21:08:41

Does anyone else actually have hot code reloading working reliably and quickly with expo + shadow? Here is an example of what I've been experiencing https://youtu.be/UhQNRVyC8VM?t=58, also note the part at 2:20ish where I get instant updates when changing a js file. (ignore the rest of the video, its part of a blog I'm slowly doing, just wanted to see if anyone had an answer for this weirdness before I publish)

alexdavis21:08:11

Also I only need to save twice when using a real device (or sim), in react native web its slow and kills my state, but doesn't leave me with a stale bundle (unless I refresh the page, then I get a stale bundle 🤷 )

gammarray02:08:25

I have experienced the same thing. Not sure what the solution is, but I would be very interested to hear about one.

thheller05:08:18

looks to me like you still have the react-native hot-reload active?

thheller05:08:25

the first reload you see is shadow-cljs

thheller05:08:29

the second shouldn't happen at all

thheller05:08:17

btw try (tap> activity) and looking at it in the shadow-cljs ui http://localhost:9630/inspect. instead of the def thingy

thheller05:08:46

I think if you disable fast refresh expo still does the old slow refresh. there was an option to disable that too last time I looked at it. but its been a while, not sure where to

alexdavis08:08:56

Sorry guess I linked a bit late in the video, I show that I have fast refresh turned off, I have also tried that web pack config @U0ETXRFEW and still get the same issue. Also why would it only happen on cljs files if it was to do with the expo/webpack tooling?

pez09:08:39

And why do you get refreshing of js files when you have both fast refresh and webpack refresh disabled?

alexdavis10:08:51

Because those js files are required in my cljs code I guess?