figwheel-main

figwheel-main http://figwheel.org
bhauman 2020-07-08T17:51:16.456900Z

Support for react native just landed in 0.2.10-SNAPSHOT

bhauman 2020-07-08T17:51:30.457100Z

https://figwheel.org/docs/react-native.html

2🎂1
2020-07-08T21:06:11.458700Z

@bhauman I'm testing the new React native docs/feature, thank you for this! Great work as usual ! 🙂

2020-07-08T21:20:08.462300Z

First launch give me a missing create-react-class package error. It seems the last create-react-native doesn't provide this package anymore and react-native-figwheel-bridge use it, so I do npm install create-react-app.

2020-07-08T21:26:24.463300Z

After that, I run this error on Android emulator (I haven't tested on real devices).

[Wed Jul 08 2020 23:23:37.936]  ERROR    Unable to fetch optionsUrl <http://localhost:9500/cljs-out/android/cljsc_opts.json>
[Wed Jul 08 2020 23:23:38.542]  WARN     Possible Unhandled Promise Rejection (id: 0):
TypeError: undefined is not an object (evaluating 'config.evaluate')

bhauman 2020-07-08T21:36:05.463800Z

@admin055 OK interesting!

bhauman 2020-07-08T21:38:09.464300Z

@admin055 how did you create the application?

bhauman 2020-07-08T21:38:56.465Z

I would do a npm install create-react-class not npm install create-react-app

bhauman 2020-07-08T21:42:36.466200Z

OK I think I found the bug you are running into

bhauman 2020-07-08T21:42:56.466800Z

its interesting because you are on a different platform

2020-07-08T21:43:15.467200Z

> I would do a npm install create-react-class not npm install create-react-app Right, it's what i'm doing 🙂 My mistake, only a typo

bhauman 2020-07-08T21:43:30.467500Z

gotcha thats’ what I thought

bhauman 2020-07-08T21:45:00.468500Z

@admin055 so in your output-dir + “_rn” there is a clojurescript-bootstrap.js file

bhauman 2020-07-08T21:45:23.468900Z

line 31 is where the error is being thrown

bhauman 2020-07-08T21:45:40.469200Z

if you change that to var evaluate = config["evaluate"] || eval;

bhauman 2020-07-08T21:46:16.469700Z

you should be in business

bhauman 2020-07-08T21:46:51.470500Z

but don’t re-run figwheel, just see if the react-android builder starts

bhauman 2020-07-08T21:47:49.471400Z

Also this is a good point that I should stop using create-react-class and just use react-hooks

1👍
bhauman 2020-07-08T21:49:35.471900Z

or wait just have a class as its going through the transpiler

2020-07-08T21:52:40.472900Z

> if you change that to     var evaluate = config["evaluate"] || eval; Again "undefined" :

TypeError: undefined is not an object (evaluating 'config["evaluate"]')

bhauman 2020-07-08T21:52:59.473300Z

oh so no config is nil

bhauman 2020-07-08T21:53:56.473800Z

oh that’s because of the first error its not finding the cljsc_opt.json file

bhauman 2020-07-08T21:54:32.474300Z

@admin055 is that file there in your output-dir?

bhauman 2020-07-08T21:54:46.474500Z

cljs-out/android/cljsc_opts.json

bhauman 2020-07-08T21:55:05.474700Z

or at this url

<http://localhost:9500/cljs-out/android/cljsc_opts.json>

2020-07-08T21:57:55.475200Z

Yes, the file exists

2020-07-08T22:02:00.476800Z

After uninstall the app and relaunch the builder, no more error but blank page in app. It's late, I'll retry tomorrow. Thx for the support!

bhauman 2020-07-08T22:20:07.477600Z

cool hit me up tomorrow, sounds like a race condition where the server hasn’t started

bhauman 2020-07-08T22:20:18.477900Z

so it can’t find the file

bhauman 2020-07-08T22:32:54.479Z

Thanks for trying this out @admin055 I really need this early feedback to work out the last bugs. Sorry I didn’t try this with android. It’s such a large setup time.

1👍