Incrementally Migrating To React-Native
React-Native is supposed to make things better.
- you can't just take the React front-end you build for your WebApp and generate React-Native;
- you probably have lots of WebApp pages that aren't React.
- nope, this is wrong thinking. Better to do Spike Solution of ReactNative shell with any WebView, then start iterating!
Getting Started - on Mac - for Android
- Jul'2017 https://medium.com/@sunilk/react-native-my-developer-guide-to-configure-build-and-publish-using-mac-for-android-2df123138640
- Oct'2016 https://medium.com/pvtl/react-native-android-development-on-mac-ef7481f65e47
irrelevant notes where I'm forced to upgrade MacOsX
I have XCode but it's v3.2.6 and current is v8.3.3!
- no obvious way to upgrade, so go for fresh install - ack have to have MacOsX 10.12 and I have 10.9.5.
- I run updater, but that's just patches, so I'm still at 10.9.5.
- I realize that this is for learning, and my phone is Android, and I think I only need XCode for building iOS apps, so decide to skip this part.
- meta-rant: this kind of gratuitous dependency is a big barrier to normal humans Learning Programming
Install/launch Android Studio - no apparent version problems.
- following the Oct'2016 link above because it doesn't talk about XCode
- looks like some Components have changed names, but think I have the right bits
- set up bash
- ignoring JDK for the moment because I think I have key bits already, and don't want to muck with it
- add Google Play Services
- hmm can't run
android sdkat all, time to abandon this path as being obsolete
Go back to core page https://facebook.github.io/react-native/releases/0.30/docs/getting-started.html
brew install nodeget same error I get when trying to
brew updatemy outdated OpenSSL code - see TwiitterBot page
brew install node Error: /usr/local/Library/Homebrew/download_strategy.rb:84: invalid multibyte escape: /^\037\213/ invalid multibyte escape: /^\037\235/ Please report this bug at http://github.com/mxcl/homebrew/issues /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/Library/Homebrew/formula.rb:1:in `<top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/Library/Homebrew/formula_installer.rb:1:in `<top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/Library/Homebrew/brew.h.rb:427:in `brew_install' /usr/local/bin/brew:266:in `<main>' BillSeitzMacBookPro2014% brew update ruby error: The following untracked working tree files would be overwritten by checkout: .gitignore Library/Contributions/brew_bash_completion.sh Library/Contributions/brew_zsh_completion.zsh Library/Formula/a52dec.rb Library/Formula/aacgain.rb Library/Formula/aalib.rb Library/Formula/abook.rb Library/Formula/ack.rb Library/Formula/activemq.rb Library/Formula/adplug.rb Library/Formula/advancecomp.rb Library/Formula/aescrypt.rb Library/Formula/aircrack-ng.rb Library/Formula/algol68g.rb Library/Formula/allegro.rb Library/Formula/alpine.rb Library/Formula/android-ndk.rb (lots more) Library/Formula/discount.rb Library/Formula/d Aborting Error: Failure while executing: git checkout -q master
- try this - no complaints
brew update- seems ok until
HEAD is now at 751334a Merge pull request #3076 from DomT4/high_sierra_b7 To restore the stashed changes to /usr/local run: 'cd /usr/local && git stash pop' ==> Homebrew has enabled anonymous aggregate user behaviour analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics.html ==> Tapping homebrew/core Cloning into '/usr/local/Library/Taps/homebrew/homebrew-core'... remote: Counting objects: 4556, done. remote: Compressing objects: 100% (4345/4345), done. remote: Total 4556 (delta 36), reused 457 (delta 11), pack-reused 0 Receiving objects: 100% (4556/4556), 3.63 MiB | 22.00 KiB/s, done. Resolving deltas: 100% (36/36), done. Checking connectivity... done. Tapped 4341 formulae (4,600 files, 11.3MB) Already up-to-date. Error: Could not link: /usr/local/share/man/man1/brew.1 Please delete these paths and run `brew update`. ==> Migrating HOMEBREW_REPOSITORY (please wait)... Error: Could not link: /usr/local/share/man/man1/brew.1 Please delete these paths and run `brew update`. ==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew! Homebrew no longer needs to have ownership of /usr/local. If you wish you can return /usr/local to its default ownership with: sudo chown root:wheel /usr/local
- so do
rm -rf /usr/local/share/man/man1/brew.1, then
brew updateagain; it says
sudo chown root:wheel /usr/local
- back to
brew install node- get various warnings/alerts, but going to ignore them and try to move on
clang: error: no such file or directory: '/usr/local/lib/libiconv.dylib' make: *** [pkg-config] Error 1 make: *** [all-recursive] Error 1 make: *** [all] Error 2 ... Error: You are using macOS 10.9. We (and Apple) do not provide support for this old version. You may encounter build failures or other breakages. Please create pull-requests instead of filing issues.
brew install watchman
watchman: macOS Yosemite or newer is required. Error: An unsatisfied requirement failed this build.
- so I guess I'm really blocked unless I move to MacOsX 10.10 at least. But I guess I'll whole-hog to the current version. (Update: done)
- now doing
brewmakes me upgrade XCode. So I go ahead.
actually moving on with Facebook's main GettingStarted doc
npm-install... all good
react-native init AwesomeProject runs
Edited: | Tweet this!