I need some general advice, if someone has it. I have found this https://github.com/thheller/reagent-react-native and trying to adapt it to a windows-wsl setup. I am not sure which part should be inside of WSL, has anyone done something similar that's available publicly? 🙂 I know I am asking for much, but from the answers it seems I might be better of just ditching windows for any project using react native with shadow-cljs.
why would ditching windows be a factor? I mean I use windows so I know that all the commands work fine there. don't have a clue about react-native and wsl though
given that I made the reagent-react-native
demo on windows I assume it works fine still 😉 IIRC I didn't use wsl though
wait, so everything inside windows? i have not yet tried that, using git with ssh was difficult last time
anyway, this is exactly the kind of information I needed, thanks
I mean I use WSL1 still so I have all the files on my windows drive and access them using windows tools
just some command line stuff I run through WSL sometimes. shadow-cljs I mostly run directly in windows. RN too because of the emulator stuff
makes total sense, I am just starting with react native (again, once I tried it several years ago), everything is new, I don't even know which bit goes where
is it possible to disable certain warnings being outputted to the console during dev builds? something like :ignore
in :warnings-as-errors
, but to disable output instead?
you are supposed to fix warnings not ignore them 😛
haha totally agree with you. its coming from an interned (no longer maintained) library, which is my reasoning
but that's a totally fair stance
I'm having some bizarre problem importing and using the npm package, which I haven't encountered before.
<https://date-fns.org/v2.22.1/docs/Time-Zones>
["date-fns-tz" :rename {format dtftz.format}]
...
(dtftz.format (js/Date.) "Europe/Berlin")
;;=>
module$node_modules$date_fns_tz$index is not defined
this would be a lot more helpful if it was an actual reproducible snippet
which shadow-cljs version? which :target?
thheller/shadow-cljs {:mvn/version "2.11.23"}
:target :browser
I upgraded the shadow-cljs version to the latest 2.14.5, but it doesn't change anything
then it should be easy to make a reproducible repo. can't say much else.
FWIW you call looks wrong to begin with?
const output = format(zonedDate, pattern, { timeZone: 'Europe/Berlin' })
thats not what you have?
sure, I will check one more thing and do repo right away
on a clean project it works
which means I need to see what I have broken and where
sometimes just restarting shadow-cljs might help
if you run npm install
while shadow is running it sometimes gets confused
dunno if you did that but restart is always a good check 😛
I tried, also deleted the .shadow-cljs folder
but what else I have noticed, which may give some guidance, in this particular project also importing via
["date-fns/format" :as format]
also causes the same type of error
not just import, but the later use of
the fact that it is an electron should be rather irrelevant, shouldn't it?
not really. that is very relevant. it is not a regular browser anymore
argh
this is not an electron issue either, because again on a relatively clean project it works
I mean did you try this in actual code anywhere? maybe the REPL is not the best place to verify it
don't know any particulars about electron but I know they changed some security related things
maybe they sandboxed some more. really don't know
I'm trying something like (js-keys dtf-tz)
to see if it even exists and what it has inside
never mind, thanks for your time, if I figure it out, I'll share
that is checking the wrong thing if dtf-tz
is undefined
what module$node_modules$date_fns_tz$index is not defined
basically means
I don't really know what I'm checking, but I know that if it works, it spits out a list of functions, and on a clean project it works
in the browser you can easily verify it it the console since it will even autocomplete once you start typing module$...
(js-keys dtf-tz);; => #js ["format" "getTimezoneOffset" "toDate" "utcToZonedTime" "zonedTimeToUtc"]
works in the browser or works in electron?
I created a clean repo and added electron
and works as above
it doesn't work in one particular project and I'm curious why and what I've messed up, especially as it has >1y and maybe I've misconfigured something somewhere
could be a dependency version conflict in some npm package
did you restart shadow-cljs after updating it? and updated it in the correct place? I did fix a bug somewhat related to this not too long ago. definitely after 2.11.23
or did you test with the 2.11.23 in the empty project?
no, 2.14.5
I found it.