This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-27
Channels
- # announcements (2)
- # asami (25)
- # babashka (124)
- # beginners (46)
- # calva (55)
- # cljdoc (70)
- # clojure (68)
- # clojure-australia (2)
- # clojure-dev (63)
- # clojure-europe (38)
- # clojure-nl (1)
- # clojure-spec (1)
- # clojure-uk (8)
- # clojurescript (56)
- # community-development (4)
- # conjure (1)
- # copenhagen-clojurians (1)
- # core-async (1)
- # cursive (3)
- # datahike (5)
- # datomic (183)
- # depstar (2)
- # figwheel-main (10)
- # fulcro (20)
- # honeysql (2)
- # hyperfiddle (1)
- # integrant (68)
- # jobs (6)
- # jobs-discuss (5)
- # juxt (1)
- # malli (13)
- # off-topic (8)
- # pathom (2)
- # rdf (10)
- # reagent (11)
- # remote-jobs (1)
- # rum (1)
- # shadow-cljs (69)
- # spacemacs (1)
- # sql (5)
- # tools-build (51)
- # tools-deps (6)
- # xtdb (24)
@nick.romer Sounds like a local IP issue, try setting something like
{:ring-server-options {:port 9500 :host "192.168.1.62 (your local network IP here)"}}
… in the figwheel-main.ednHi @U050KSS8M, I actually don't understand the link between a ring server and a mobile app. I thought ring servers were for web apps?
OK, thank you @U050KSS8M! I learned something about figwheel. I really appreciate you answering me and I hope you hang on a little more. My problem is not during the dev phase; I can repl into figwheel just fine and expo web (the mobile phone emulator running in a browser) shows me the correct mobile app behaviour. My problem arises when I want to compile my app for prod release in order to create an installable Android apk. My assumption is that figwheel should remove itself from the code during a prod compile. Am I right?
Unfortunately I don’t think figwheel does that automatically in the case of React Native. I ended up modifying the :advanced output manually after compilation.
Remove the code that looks something like:
module.exports = { renderFn: ar.main.figwheel_rn_root };
… And make sure that the application has a way to start when in production mode. There might be a better/automatic way to do this but I haven’t investigated.
Hi @U050KSS8M, that didn't help. I'm trying to take a step back and understand the fundamentals.
I ran a prod build like so: clojure -m figwheel.main -O advanced -bo android
and tried to visualizer it with expo start -w
. Is that legit?
The problem with that is that the compiled main.js is not copied to the project root as index.js. Therefore I modified package.json: `{
"main": "target/public/cljs-out/android/main.js",` Again, I'm not sure if that's the right way to do it.
In any case, after this modification expo start -w
compiles without errors, however there is an error on the browser based emulator: ReferenceError: fig is not defined
pointing to this line in the code : module.exports = { renderFn: fig.main.figwheel_rn_root };
My goal is to get a functioning apk that runs on my phone. I'm grateful or any help I can get.