drapanjanas / re-natal

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

Initial run-ios fails during packaging #126

Open mfikes opened 7 years ago

mfikes commented 7 years ago

If you follow the sequence of example steps for setting up an app, it will fail at the packaging point.

$ re-natal init FutureApp
Creating FutureApp
☕  Grab a coffee! I will use yarn, but fetching deps still takes time...
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 future-app

Run iOS app:
react-native run-ios > /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 'future-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

$ cd future-app
$ react-native run-ios > /dev/null

The following commands produced analyzer issues:
    Analyze /Users/mfikes/Desktop/future-app/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    Analyze /Users/mfikes/Desktop/future-app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)

Then the packager will be "stuck" with this in its console:

Scanning 558 folders for symlinks in /Users/mfikes/Desktop/future-app/node_modules (49ms)
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  Running packager on port 8081.                                            │
 │                                                                            │
 │  Keep this packager running while developing on any JS projects. Feel      │
 │  free to close this tab and run your own packager instance if you          │
 │  prefer.                                                                   │
 │                                                                            │
 │  https://github.com/facebook/react-native                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   /Users/mfikes/Desktop/future-app

React packager ready.

Loading dependency graph, done.
Bundling `index.ios.js`  ░░░░░░░░░░░░░░░░  0.0% (0/1)

And the simulator will time out indicating that it could not connect to the development server.

$ npm --version
5.0.3
$ node --version
v8.1.4
$ react-native --version
react-native-cli: 2.0.1
ScaldingHotCoffee commented 5 years ago

I've been having a lot of trouble with this. I get a Lein prod-build error right in the beginning and then nothing else works. Any thoughts?

Davids-MacBook-Pro:projects Dave$ re-natal init natalTest Creating natalTest ☕ 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 Command failed: lein prod-build Davids-MacBook-Pro:projects Dave$ npm --version 6.5.0 Davids-MacBook-Pro:projects Dave$ node --version v11.6.0 Davids-MacBook-Pro:projects Dave$ react-native --version react-native-cli: 2.0.1 react-native: n/a - not inside a React Native project directory Davids-MacBook-Pro:projects Dave$ cd natalTest -bash: cd: natalTest: No such file or directory Davids-MacBook-Pro:projects Dave$ ls expo-test hobbit-project natal-test hey-world natal-practice package-lock.json hobbit-killer natal-practice-two rn-test Davids-MacBook-Pro:projects Dave$ cd natal-test Davids-MacBook-Pro:natal-test Dave$ react-native run-ios >/dev/null xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

Command failed: xcrun instruments -s xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

Error: Command failed: xcrun instruments -s xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

at checkExecSyncError (child_process.js:622:11)
at Object.execFileSync (child_process.js:640:13)
at Object.runIOS [as func] (/Users/Dave/Projects/natal-test/node_modules/react-native/local-cli/runIOS/runIOS.js:76:17)
at Promise.resolve.then (/Users/Dave/Projects/natal-test/node_modules/react-native/local-cli/cliEntry.js:117:22)