Fork me on GitHub
#shadow-cljs
<
2022-08-11
>
muje hoxe20:08:14

running shadow with react native, but it requires rebuild to reload on device, is that the default or is there a problem, because i saw krell updating when code is run on the repl

muje hoxe20:08:08

is this feature only available with krell?

thheller20:08:20

hot reload is fully supported. It does however using the proper annotation and render function

muje hoxe20:08:40

yes i started from this template, should i re evaluate that piece each time i load or change a function?

thheller20:08:16

no, should all work on its own. but it requires that your running app was able to connect back to the shadow-cljs instance

thheller20:08:21

maybe the websocket connect fails?

thheller20:08:41

check the react-native logs

thheller20:08:04

(I don't use react-native myself, so the help I can offer is limited)

thheller20:08:41

it might be picking the wrong IP to connect to

muje hoxe20:08:19

pretty much connected, using calva

thheller20:08:38

don't know what you mean by that

muje hoxe20:08:43

npx shadow-cljs -d cider/cider-nrepl:0.28.5 watch :app shadow-cljs - config: /home/o/Documents/clj/repos/shadow-cljs.edn shadow-cljs - server version: 2.19.8 running at http://localhost:9630 shadow-cljs - nREPL server started on port 46535 shadow-cljs - watching build :app [:app] Configuring build. [:app] Compiling ... [:app] Build completed. (93 files, 0 compiled, 0 warnings, 9.23s) [:app] Compiling ... [:app] Build completed. (93 files, 1 compiled, 0 warnings, 0.48s)

muje hoxe20:08:50

here is the output

thheller20:08:03

yes, that looks fine

muje hoxe20:08:23

it refreshes only when i save the file

thheller20:08:32

if your react-native app is properly connected it should list it there

muje hoxe20:08:06

#1 JVM Clojure Runtime Connected 45 minutes ago #12 - build: app react-native - Connected 1 minute ago

thheller20:08:35

ok then it seems connected fine

thheller20:08:58

the metro log should tell you what shadow-cljs is doing

muje hoxe20:08:41

info Reloading app... BUNDLE ./index.js LOG Running "AwesomeProject" with {"rootTag":61} ERROR TypeError: undefined is not an object (evaluating 'device.id') This error is located at: in Camera (created by repos.app.cam) in repos.app.cam in RCTView (created by View) in View (created by repos.app.root) in repos.app.root in Unknown in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in AwesomeProject(RootComponent) ERROR TypeError: undefined is not an object (evaluating 'device.id') This error is located at: in Camera (created by repos.app.cam) in repos.app.cam in RCTView (created by View) in View (created by repos.app.root) in repos.app.root in Unknown in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in AwesomeProject(RootComponent) LOG shadow-cljs #14 ready!

muje hoxe20:08:08

i am suspecting that these errs is related to the application

thheller20:08:22

looks like it

muje hoxe20:08:01

they repeat twice, why is that?

thheller20:08:19

can't see your code and don't know much about react-native to begin with

muje hoxe20:08:47

yeah when i comment the responsible line it works fine

muje hoxe20:08:01

so it is related to the code not the connection

muje hoxe20:08:55

well thanks anyway

muje hoxe21:08:48

i think there is a problem with the repl

muje hoxe21:08:20

i tried to eval (some? nil)

thheller21:08:36

well, I guess it is not connected properly

thheller21:08:44

check the runtimes page again

muje hoxe21:08:07

never mind just syntax err prevented exe now its working but reloading is still missing without saving and rebuild, sorry kind of noob here

thheller21:08:05

again .. the log will tell you what shadow-cljs is doing

Sri22:08:24

I was upgrading to latest [email protected]. I changed my code to point to tick.core instead of tick.alpha.api. Running release locally I have no issues, but running on CI (github action) gives me the following error. I have removed all references to tick.alpha.api in my code. Any help in pinpointing what the issue could be?

Run shadow-cljs -v release app
  shadow-cljs -v release app
  shell: /usr/bin/bash -e {0}
  env:
    SSH_AUTH_SOCK: /tmp/ssh-puo472pwx35q/agent.1748
    SSH_AGENT_PID: 1749
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.16-8/x64
shadow-cljs - config: /home/runner/work/innsmouth/innsmouth/shadow-cljs.edn
shadow-cljs - starting via "clojure"
DEPRECATED: Libs must be qualified, change figwheel-sidecar => figwheel-sidecar/figwheel-sidecar (deps.edn)
DEPRECATED: Libs must be qualified, change hashp => hashp/hashp (deps.edn)
[2022-08-11 22:00:26.689 - WARNING] :shadow.build.classpath/bad-jar-contents - {:jar-file "/home/runner/.m2/repository/re-frame-utils/re-frame-utils/0.1.0/re-frame-utils-0.1.0.jar", :bad-prefix "out", :bad-count 67}
[:app] Compiling ...
-> build target: :browser stage: :configure
<- build target: :browser stage: :configure (5 ms)
-> Resolving Module: :app
The required namespace "tick.alpha.api" is not available, it was required by "innsmouth/controller/accounts.cljs".

thheller22:08:46

> The required namespace "tick.alpha.api" is not available, it was required by "innsmouth/controller/accounts.cljs".

thheller22:08:10

the error seems pretty clear? I cannot see your code so dunno what else might be up

Sri22:08:54

The problem is I tick.alpha.api does not seem to be referenced directly. I already did a search.

thheller22:08:19

then check if the innsmouth/controller/accounts.cljs file actually is what you think it is

thheller22:08:59

I don't know what you have in your deps.edn so maybe you are loading that from a library or something

👍 1