drapanjanas / re-natal

Bootstrap ClojureScript React Native apps
MIT License
1.22k stars 100 forks source link

Enabling auto-require breaks re-natal #221

Closed mvid closed 5 years ago

mvid commented 5 years ago

I created a brand new app, and after enabling auto-require, re-natal starts failing with a cryptic error:

➜  ios: re-natal init TestApp
Creating TestApp
☕  Grab a coffee! Downloading deps might take a while...
Creating Leiningen project
Updating Leiningen project
Creating React Native skeleton.
Creating Re-Natal config
Compiling ClojureScript

To get started with your new app, first cd into its directory:
cd test-app

Run iOS app:
react-native run-ios --configuration Debug > /dev/null

To use figwheel type:
re-natal use-figwheel
lein figwheel ios

Reload the app in simulator (⌘ + R)

At the REPL prompt type this:
(in-ns 'test-app.ios.core)

Changes you make via the REPL or by changing your .cljs files should appear live.

Try this command as an example:
(dispatch [:set-greeting "Hello Native World!"])

✔ Done

➜  ios: cd test-app
➜  test-app: ls
CHANGELOG.md       android            figwheel-bridge.js index.ios.js       package-lock.json  src
LICENSE            doc                images             ios                package.json       target
README.md          env                index.android.js   node_modules       project.clj        test
➜  test-app re-natal use-figwheel

Cleaning...
index.ios.js was regenerated
index.android.js was regenerated
Host in RCTWebSocketExecutor.m was updated
Dev server host for iOS: localhost
Dev server host for Android: localhost
➜  test-app: re-natal use-ios-device simulator
Using 'localhost' for iOS simulator
Please run: re-natal use-figwheel to take effect.
➜  test-app: re-natal enable-auto-require
Auto-Require feature is enabled in use-figwheel command
➜  test-app: re-natal use-figwheel
Cleaning...
Auto-require is enabled. Scanning for require() calls in *.cljs files...
Cannot read property 'concat' of undefined
➜  test-app:
neutrous commented 5 years ago

206

drapanjanas commented 5 years ago

This should be fixed in v0.11.1