Member-only story
The resurrection of a year-old React-Native app
I got an upgrade project. React Native application which has not been released for a year with the last commit on 29/02/2020
.
The task, as simple as it might sound, is a challenging one—get the app compiling for Andriod and upgrade it to the newest (0.63.4
) React Native version.
You guessed it right—the app does not build. The team who inherited the app from another team are full-stackers but after spending a few days on it decided their time is better used in other parts of the projects and outsourced the compile-fix and upgrade to yours truly.
Let’s crack on it.
As a first step, naturally, I git-cloned
the repository into my main-workstation, installed dependencies and tried to run it:
$ npm install
$ react-native run-android
As expected, a bunch of errors. I could have started working on errors in my main-workstation, however, there’s a big gotcha with React Native environments—they are hard to isolate.
I have a lot of different projects in play which ranges in versions for php
, node
, python
and other supporting toolings. With docker
, these are easy to isolate project environments, meaning all projects sit in the same machine but run in isolation.
React Native is challenging to isolate and I’m yet to find a good docker
container which can support 1+N React Native projects with different project toolings (node
, java
) whit out sacrificing speed of development. That's right, people highly underestimate how much admin-time it takes to deal with docker
.
As a result, I run React Native in the OS. I was certain my main-workstation will be to new for the year-old application, and I did not want to change anything in my OS setup.
It’s good that exactly for such purpose I have a spare MacBook which I factory-reset and setup project by project.
Fresh macOS Big Sur, install brew, environment toolings and let’s take a closer look at the repository.
# Get brew in, then...$ brew install --cask android-studio
$ brew install --cask android-platform-tools
$ brew install --cask adoptopenjdk
$ brew install react-native-cli
$ brew install nvm
$ brew install yarn
$ xcode-select --install# Optional
$ brew install alacritty
$ brew install zsh