Fork me on GitHub
#cljsrn
<
2017-08-29
>
tetriscodes15:08:29

anyone got a guide for debugging re-natal?

zlrth15:08:36

i’m missing something basic. after i run lein prod-build, what do i do to run the app (either from the simulator or a real device) without running figwheel? I get failed to something something importScripts when i run react-native run-ios or when i run it from xcode on my real device.

zlrth15:08:40

npm start? that works on the template project re-natal init sampleProject, but not on my app. on my app, it hangs here:

React packager ready.

Loading dependency graph, done.

mfikes15:08:19

@mfm You need to run a release build. Either manually change the scheme in Xcode or react-native run-ios --configuration=Release

tetriscodes16:08:15

Error: ENOENT: no such file or directory, open 'node_modules/react-native/packager/react-packager/src/Server/index.js'

tetriscodes16:08:31

no dir node_modules/react-native/packager

tetriscodes16:08:34

hmmm. Nevermind. Couldn’t find fs and ran nvm use v8 and it worked

zlrth18:08:18

thanks @mfikes. i was able to get the re-natal init sampleProject to work with a production build. but, i’m getting a behavior i’ve seen other people get: JavaScript heap out of memory. this is with :simple optimization. i’m going to try :advanced, soon. i was wondering if anyone had any pointers.

mfikes18:08:56

Yeah, you can futz with the node command embedded in the script to try to give it more memory

mfikes18:08:33

(The script is visible / editable in Xcode under one of the “build” tabs… I don’t have a project handy.)

zlrth18:08:03

ah thanks. ok.

mfikes18:08:09

It is the --max_old_space_size argument you need to add to it

mfikes18:08:40

:advanced is worth it if App Launch latency is important, IMHO

mfikes18:08:13

(roughly 2 seconds vs 3 for Vocabulario http://fikesfarm.com/vocabulario/)

seantempesta18:08:29

Just updated cljs-expo-template to support Expo v20. (Give it a shot via lein new expo your-project). See the github page for more details. https://github.com/seantempesta/expo-cljs-template/ Updates: expo “20.0.0”

pesterhazy21:08:30

@mfm, @mfikes's advice is good, another option is to use this trick: https://github.com/pesterhazy/re-natal-husk

pesterhazy21:08:57

it circumvents the packager issues and works with simple optimization (and should work with advanced ones as well)