Skip to main content
Version: Next

Setting up the Development Environment

This document guides you through setting up your development environment to start contributing to our codebase.

Prerequisites

Please complete our Introductory environment setup guide before proceeding. This ensures you have the necessary tools and dependencies installed in order to run Detox tests, which is a fundamental step before being able to contribute to the project itself.

Node.js

We recommend using nvm or nvm-windows to manage your Node.js versions. However, you can find our required Node.js version in the .nvmrc file and install it using your preferred method or from the official download page.

Currently, we require lts/iron (Node.js 20.x) for our development environment.

tip

The exhaustive list of LTS codenames (e.g. lts/iron) can be found at CODENAMES.md in the Node.js repository.

Setting Up The Monorepo Management

Our repository is a monorepo, which means it contains multiple Detox-related projects and packages. Read more about our repository structure.

To set up the monorepo locally, follow these steps:

Install the monorepo management tool, lerna:

npm install lerna@6.x.x --global

Clone the repository and navigate to the project directory:

git clone git@github.com:wix/Detox.git
cd detox
git submodule update --init --recursive

From the project's root directory, install and link the internal projects:

lerna bootstrap

Installing Common Dependencies

React-Native CLI

react-native-cli is a command line interface for React Native.

npm install react-native-cli --global

Watchman

Watchman is a tool by Facebook for watching changes in the filesystem.

brew install watchman

xcpretty

xcpretty is a fast and flexible formatter for xcodebuild.

gem install xcpretty