Building react native project with native code

Step 1: Installing dependencies

You will need Node, Watchman, the React Native command line interface, and Xcode.

Node, Watchman

We recommend installing Node and Watchman using Homebrew. Run the following commands in a Terminal after installing Homebrew:

brew install node
brew install watchman

If you have already installed Node on your system, make sure it is version 6 or newer.

To check node version run the following commands in a Terminal

node --version

Update Node Using a Package Manager
Node package manager, or npm, helps you discover, share, and use code, along with managing dependencies.

Node comes with npm pre-installed, but the manager is updated more frequently than Node.

Run npm -v

to see which version you have, then

npm install npm@latest -g

to install the newest npm update.

Run npm -v

again if you want to make sure npm updated correctly.

To update Node, you’ll need npm’s handy n module. Run this code to clear npm’s cache, install n, and install the latest stable version of Node:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

To install the latest release, use n latest. Alternatively, you can

run n #.#.#

to get a specific Node version.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s