Fork me on GitHub
#cljsrn
<
2016-03-25
>
johannesgu10:03:18

Hi all, newbie here. I just created a new project using re-natal. It works great when running in the IOS simulator but when I switch to my iPhone I get a "Error loading script, please check your config setup". I have updated AppDelegate.m to point to my Mac ip and called re-natal use-ios-device <myip>. Any ideas how to troubleshoot this?

johannesgu10:03:46

Looking in the xcode console log it looks like it tries to load google closure

johannesgu10:03:52

2016-03-25 11:36:42.137 [info][tid:com.facebook.React.JavaScript] Loading Closure base.
2016-03-25 11:36:42.137 [info][tid:com.facebook.React.JavaScript] Shimming require
2016-03-25 11:36:42.155 [error][tid:com.facebook.React.JavaScript] Error loading script, please check your config setup.
2016-03-25 11:36:42.168 [error][tid:com.facebook.React.JavaScript] { [TypeError: Network request failed]
  line: 14392,
  column: 21,
  sourceURL: '' }

johannesgu12:03:06

I think I found it. It still tries to load goog/base.js from localhost. Now I just have to figure out why...

johannesgu12:03:31

I deleted index.ios.js and target/, called re-natal use-figwheel again and all of a sudden it worked. I must have missed something before. Sorry for the noise simple_smile

seantempesta16:03:25

@johannesgu: Yeah, I’ve hit that a couple of times myself. The order of operations is really important when making any changes to a react-native project.

lein clean       ;; wipe everything
re-natal use-figwheel || lein prod-build ;; produces the index.ios and index.android files
lein figwheel ios ;; if in dev